Skip to content

Commit 85a6006

Browse files
committed
Copy .eslintrc.json from react-native-template-redux-typescript
1 parent 5c9e94a commit 85a6006

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

examples/publish-ci/react-native/.eslintrc.json

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,33 @@
22
"extends": [
33
"eslint:recommended",
44
"@react-native",
5-
"plugin:@typescript-eslint/eslint-recommended",
6-
"plugin:@typescript-eslint/strict-type-checked",
7-
"plugin:@typescript-eslint/stylistic-type-checked",
8-
"plugin:react/jsx-runtime"
5+
"plugin:react/jsx-runtime",
6+
"prettier"
97
],
10-
"ignorePatterns": ["node_modules", ".vscode", "dist", "metro.config.js"],
118
"parser": "@typescript-eslint/parser",
12-
"parserOptions": {
13-
"project": true,
14-
"tsconfigRootDir": "./"
15-
},
9+
"parserOptions": { "project": true, "tsconfigRootDir": "./" },
1610
"plugins": ["@typescript-eslint"],
1711
"root": true,
1812
"rules": {
1913
"@typescript-eslint/consistent-type-imports": [
14+
2,
15+
{ "fixStyle": "separate-type-imports" }
16+
],
17+
"@typescript-eslint/no-restricted-imports": [
2018
2,
2119
{
22-
"fixStyle": "separate-type-imports"
20+
"paths": [
21+
{
22+
"name": "react-redux",
23+
"importNames": ["useSelector", "useStore", "useDispatch"],
24+
"message": "Please use pre-typed versions from `src/app/hooks.ts` instead."
25+
}
26+
]
2327
}
2428
]
2529
},
2630
"overrides": [
27-
{
28-
"files": ["./__tests__/**/*.ts", "./__tests__/**/*.tsx"],
29-
"env": { "jest": true }
30-
}
31+
{ "files": ["*.{c,m,}{t,j}s", "*.{t,j}sx"] },
32+
{ "files": ["*{test,spec}.{t,j}s?(x)"], "env": { "jest": true } }
3133
]
3234
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"semi": false,
3-
"arrowParens": "avoid"
2+
"arrowParens": "avoid",
3+
"semi": false
44
}

0 commit comments

Comments
 (0)