Skip to content

Commit 7bee0a4

Browse files
Merge pull request #6 from SimformSolutionsPvtLtd/develop
Release v1.0.0
2 parents b4c10c1 + 45b0253 commit 7bee0a4

File tree

139 files changed

+6568
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+6568
-1
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
**/node_modules
2+
example/
3+
lib/

.eslintrc.js

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
const OFF = 0;
2+
const WARN = 1;
3+
const ERROR = 2;
4+
5+
module.exports = {
6+
extends: ['@react-native-community', 'prettier'],
7+
plugins: ['prettier'],
8+
root: true,
9+
ignorePatterns: ['.eslintrc.js'],
10+
rules: {
11+
'prettier/prettier': [
12+
'error',
13+
{},
14+
{
15+
usePrettierrc: true,
16+
},
17+
],
18+
'prefer-const': 'warn',
19+
'no-console': ['error', { allow: ['warn', 'error'] }],
20+
// General
21+
indent: [
22+
OFF,
23+
2,
24+
{
25+
SwitchCase: 1,
26+
VariableDeclarator: 1,
27+
outerIIFEBody: 1,
28+
FunctionDeclaration: {
29+
parameters: 1,
30+
body: 1,
31+
},
32+
FunctionExpression: {
33+
parameters: 1,
34+
body: 1,
35+
},
36+
flatTernaryExpressions: true,
37+
offsetTernaryExpressions: true,
38+
},
39+
],
40+
'global-require': OFF,
41+
'no-plusplus': OFF,
42+
'no-cond-assign': OFF,
43+
'max-classes-per-file': [ERROR, 10],
44+
'no-shadow': OFF,
45+
'no-undef': OFF,
46+
'no-bitwise': OFF,
47+
'no-param-reassign': OFF,
48+
'no-use-before-define': OFF,
49+
'linebreak-style': [ERROR, 'unix'],
50+
semi: [ERROR, 'always'],
51+
'object-curly-spacing': [ERROR, 'always'],
52+
'eol-last': [ERROR, 'always'],
53+
'no-console': OFF,
54+
'no-restricted-syntax': [
55+
WARN,
56+
{
57+
selector:
58+
"CallExpression[callee.object.name='console'][callee.property.name!=/^(warn|error|info|trace|disableYellowBox|tron)$/]",
59+
message: 'Unexpected property on console object was called',
60+
},
61+
],
62+
eqeqeq: [WARN, 'always'],
63+
quotes: [
64+
ERROR,
65+
'single',
66+
{ avoidEscape: true, allowTemplateLiterals: false },
67+
],
68+
// typescript
69+
'@typescript-eslint/no-shadow': [ERROR],
70+
'@typescript-eslint/no-use-before-define': [ERROR],
71+
'@typescript-eslint/no-unused-vars': ERROR,
72+
'@typescript-eslint/consistent-type-definitions': [ERROR, 'interface'],
73+
'@typescript-eslint/indent': [
74+
OFF,
75+
2,
76+
{
77+
SwitchCase: 1,
78+
VariableDeclarator: 1,
79+
outerIIFEBody: 1,
80+
FunctionDeclaration: {
81+
parameters: 1,
82+
body: 1,
83+
},
84+
FunctionExpression: {
85+
parameters: 1,
86+
body: 1,
87+
},
88+
flatTernaryExpressions: true,
89+
offsetTernaryExpressions: true,
90+
},
91+
],
92+
// react
93+
'react/jsx-props-no-spreading': OFF,
94+
'react/jsx-filename-extension': [
95+
ERROR,
96+
{ extensions: ['.js', '.jsx', '.ts', '.tsx'] },
97+
],
98+
'react/no-unescaped-entities': [ERROR, { forbid: ['>', '"', '}'] }],
99+
'react/prop-types': [
100+
ERROR,
101+
{ ignore: ['action', 'dispatch', 'nav', 'navigation'] },
102+
],
103+
'react/display-name': OFF,
104+
'react/jsx-boolean-value': ERROR,
105+
'react/jsx-no-undef': ERROR,
106+
'react/jsx-uses-react': ERROR,
107+
'react/jsx-sort-props': [
108+
ERROR,
109+
{
110+
callbacksLast: true,
111+
shorthandFirst: true,
112+
ignoreCase: true,
113+
noSortAlphabetically: true,
114+
},
115+
],
116+
'react/jsx-pascal-case': ERROR,
117+
'react/no-children-prop': OFF,
118+
// react-native specific rules
119+
'react-native/no-unused-styles': ERROR,
120+
'react-native/no-inline-styles': ERROR,
121+
'react-native/no-color-literals': ERROR,
122+
'react-native/no-raw-text': ERROR,
123+
},
124+
globals: {
125+
JSX: 'readonly',
126+
},
127+
env: {
128+
jest: true,
129+
},
130+
};

.github/workflows/publish.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: "🚀 Publish"
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
name: 🚀 Publish
11+
runs-on: macos-13
12+
steps:
13+
- name: 📚 checkout
14+
uses: actions/checkout@v2.4.2
15+
- name: 🟢 node
16+
uses: actions/setup-node@v3.3.0
17+
with:
18+
node-version: 18
19+
registry-url: https://registry.npmjs.org
20+
- name: 🚀 Build & Publish
21+
run: yarn install && yarn build && yarn publish --access public
22+
env:
23+
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

.gitignore

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# Xcode
6+
#
7+
build/
8+
*.pbxuser
9+
!default.pbxuser
10+
*.mode1v3
11+
!default.mode1v3
12+
*.mode2v3
13+
!default.mode2v3
14+
*.perspectivev3
15+
!default.perspectivev3
16+
xcuserdata
17+
*.xccheckout
18+
*.moved-aside
19+
DerivedData
20+
*.hmap
21+
*.ipa
22+
*.xcuserstate
23+
24+
# Android/IntelliJ
25+
#
26+
build/
27+
.idea
28+
.gradle
29+
local.properties
30+
*.iml
31+
32+
# node.js
33+
#
34+
node_modules/
35+
npm-debug.log
36+
yarn-error.log*
37+
yarn.lock
38+
39+
# BUCK
40+
buck-out/
41+
\.buckd/
42+
*.keystore
43+
!debug.keystore
44+
45+
# fastlane
46+
#
47+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
48+
# screenshots whenever they are needed.
49+
# For more information about the recommended setup visit:
50+
# https://docs.fastlane.tools/best-practices/source-control/
51+
52+
*/fastlane/report.xml
53+
*/fastlane/Preview.html
54+
*/fastlane/screenshots
55+
56+
# Bundle artifact
57+
*.jsbundle
58+
59+
# Ruby / CocoaPods
60+
/ios/Pods/
61+
/vendor/bundle/
62+
63+
# generated
64+
lib

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx commitlint --edit $1

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged

.husky/pre-push

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
# npx build
5+
# npx test

.npmignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.github/
2+
example/
3+
assets/
4+
.eslintignore
5+
.eslintrc
6+
CONTRIBUTING.md
7+
babel.config.js
8+
.buckconfig
9+
jest-setup.js

.prettierrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
arrowParens: 'avoid',
3+
bracketSameLine: true,
4+
bracketSpacing: true,
5+
singleQuote: true,
6+
trailingComma: 'es5'
7+
};

CONTRIBUTING.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Contributing
2+
3+
We welcome code changes that improve this library or fix a problem, and please make sure to follow all best practices and test all the changes/fixes before committing and creating a pull request. 🚀 🚀
4+
5+
### Committing and Pushing Changes
6+
7+
Commit messages should be formatted as:
8+
9+
```
10+
<type>[optional scope]: <description>
11+
12+
[optional body]
13+
14+
[optional footer]
15+
```
16+
17+
Where type can be one of the following:
18+
19+
- feat
20+
- fix
21+
- docs
22+
- chore
23+
- style
24+
- refactor
25+
- test
26+
27+
and an optional scope can be a component
28+
29+
```
30+
docs: update contributing guide
31+
```
32+
33+
```
34+
fix(TicketId/Component): layout flicker issue
35+
```

0 commit comments

Comments
 (0)