Skip to content

Commit dc7fecc

Browse files
committed
feat: 2.1.0 is here after alpha
1 parent 14d6f4d commit dc7fecc

File tree

13 files changed

+24558
-2021
lines changed

13 files changed

+24558
-2021
lines changed

.commitlintrc.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"],
3+
"rules": {
4+
"header-max-length": [0, "always", 150],
5+
"subject-case": [0, "always", "sentence-case"],
6+
"type-enum": [
7+
2,
8+
"always",
9+
[
10+
"ci",
11+
"chore",
12+
"docs",
13+
"feat",
14+
"fix",
15+
"perf",
16+
"refactor",
17+
"revert",
18+
"style",
19+
"test"
20+
]
21+
]
22+
}
23+
}

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/**

.eslintrc.js

Lines changed: 58 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,39 @@
11
module.exports = {
22
root: true,
3-
extends: "@react-native-community",
3+
extends: [
4+
"eslint:recommended",
5+
"plugin:react/recommended",
6+
"plugin:@typescript-eslint/recommended",
7+
"@react-native-community",
8+
"prettier",
9+
],
10+
ignorePatterns: [
11+
"**/*/*.js",
12+
"*.js",
13+
"*.svg",
14+
"*.json",
15+
"*.png",
16+
"package.json",
17+
"package-lock.json",
18+
],
419
parser: "@typescript-eslint/parser",
5-
plugins: ["import", "eslint-plugin-import", "@typescript-eslint"],
20+
plugins: [
21+
"import",
22+
"react",
23+
"react-native",
24+
"prettier",
25+
"react-hooks",
26+
"@typescript-eslint",
27+
"promise",
28+
"jest",
29+
"unused-imports",
30+
],
31+
env: {
32+
browser: true,
33+
es2021: true,
34+
"jest/globals": true,
35+
"react-native/react-native": true,
36+
},
637
settings: {
738
"import/resolver": {
839
node: {
@@ -36,9 +67,25 @@ module.exports = {
3667
avoidEscape: true,
3768
},
3869
],
70+
"import/extensions": [
71+
"error",
72+
"never",
73+
{
74+
svg: "always",
75+
model: "always",
76+
style: "always",
77+
png: "always",
78+
jpg: "always",
79+
json: "always",
80+
constant: "always",
81+
},
82+
],
83+
"no-useless-catch": 0,
84+
"react-hooks/exhaustive-deps": 0,
3985
"max-len": ["error", 120],
40-
"@typescript-eslint/ban-ts-comment": 2,
41-
"@typescript-eslint/no-explicit-any": 2,
86+
"@typescript-eslint/ban-ts-comment": 1,
87+
"@typescript-eslint/no-empty-function": 0,
88+
"@typescript-eslint/no-explicit-any": 1,
4289
"@typescript-eslint/explicit-module-boundary-types": 0,
4390
"react/jsx-filename-extension": ["error", { extensions: [".tsx"] }],
4491
"react-native/no-unused-styles": 2,
@@ -47,9 +94,8 @@ module.exports = {
4794
"react-native/no-color-literals": 0,
4895
"react-native/no-raw-text": 0,
4996
"import/no-extraneous-dependencies": 2,
50-
"import/extensions": ["error", "never", { svg: "always" }],
5197
"import/no-named-as-default-member": 2,
52-
"import/order": ["error", { "newlines-between": "always" }],
98+
"import/order": 0,
5399
"import/no-duplicates": 2,
54100
"import/no-useless-path-segments": 2,
55101
"import/no-cycle": 2,
@@ -64,14 +110,14 @@ module.exports = {
64110
"import/no-deprecated": 0,
65111
"@typescript-eslint/indent": 0,
66112
"react-hooks/rules-of-hooks": 2,
67-
"react-hooks/exhaustive-deps": [
68-
"error",
69-
{ additionalHooks: "(useMemoOne)" },
70-
],
71-
"jest/no-identical-title": 2,
72-
"jest/valid-expect": 2,
73113
camelcase: 2,
74114
"prefer-destructuring": 2,
75115
"no-nested-ternary": 2,
116+
"prettier/prettier": [
117+
"error",
118+
{
119+
endOfLine: "auto",
120+
},
121+
],
76122
},
77123
};

.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 --no-install commitlint --edit

.husky/pre-commit

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+
npm run prettier
5+
npm run lint

.npmignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
node_modules
44
# Example
55
example
6-
v5-example
7-
v6-example
86
# Assets
97
Assets
108
assets

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/**

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"bracketSpacing": true,
3+
"jsxBracketSameLine": false,
4+
"singleQuote": false,
5+
"trailingComma": "all",
6+
"tabWidth": 2,
7+
"semi": true
8+
}

.prettierrc.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

lib/NavigationService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ interface RefObject<T> {
88
current: T | null;
99
}
1010

11-
export let isReadyRef: RefObject<boolean> = React.createRef<any>();
12-
export let navigationRef = createNavigationContainerRef<any>();
11+
export const isReadyRef: RefObject<boolean> = React.createRef<boolean>();
12+
export const navigationRef = createNavigationContainerRef<any>();
1313

1414
export const navigate = (routeName: string, params?: any) => {
1515
if (isReadyRef.current && navigationRef && navigationRef.current) {

0 commit comments

Comments
 (0)