1
1
{
2
- "env" : {
3
- "browser" : true ,
4
- "es2021" : true
5
- },
6
2
"extends" : [
7
- " plugin:react/recommended" ,
8
- " standard-with-typescript"
3
+ " eslint:recommended" ,
4
+ " react-app" ,
5
+ " plugin:react/jsx-runtime" ,
6
+ " prettier"
9
7
],
10
- "overrides " : [] ,
8
+ "parser " : " @typescript-eslint/parser " ,
11
9
"parserOptions" : {
12
- "ecmaVersion" : " latest" ,
13
- "sourceType" : " module" ,
14
- "project" : " tsconfig.json"
10
+ "project" : true ,
11
+ "tsconfigRootDir" : " ./"
15
12
},
16
13
"plugins" : [
17
- " react "
14
+ " @typescript-eslint "
18
15
],
16
+ "root" : true ,
19
17
"ignorePatterns" : [
20
- " lib" ,
21
- " src/scripts"
18
+ " dist"
22
19
],
23
20
"rules" : {
24
- "@typescript-eslint/semi " : [
21
+ "@typescript-eslint/consistent-type-imports " : [
25
22
2 ,
26
- " always"
23
+ {
24
+ "fixStyle" : " separate-type-imports"
25
+ }
27
26
],
28
- "@typescript-eslint/member-delimiter-style" : " off" ,
29
- "@typescript-eslint/space-before-function-paren" : " off" ,
30
- "@typescript-eslint/no-invalid-void-type" : " off" ,
31
- "@typescript-eslint/consistent-type-imports" : " off" ,
32
- "@typescript-eslint/strict-boolean-expressions" : " off" ,
33
- "@typescript-eslint/dot-notation" : " off" ,
34
- "@typescript-eslint/indent" : " off"
35
- }
27
+ "@typescript-eslint/no-restricted-imports" : [
28
+ 2 ,
29
+ {
30
+ "paths" : [
31
+ {
32
+ "name" : " react-redux" ,
33
+ "importNames" : [
34
+ " useSelector" ,
35
+ " useStore" ,
36
+ " useDispatch"
37
+ ],
38
+ "message" : " Please use pre-typed versions from `src/app/hooks.ts` instead."
39
+ }
40
+ ]
41
+ }
42
+ ]
43
+ // TODO: see if we want to keep any of these rules
44
+ // "@typescript-eslint/semi": [
45
+ // 2,
46
+ // "always"
47
+ // ],
48
+ // "@typescript-eslint/member-delimiter-style": "off",
49
+ // "@typescript-eslint/space-before-function-paren": "off",
50
+ // "@typescript-eslint/no-invalid-void-type": "off",
51
+ // "@typescript-eslint/consistent-type-imports": "off",
52
+ // "@typescript-eslint/strict-boolean-expressions": "off",
53
+ // "@typescript-eslint/dot-notation": "off",
54
+ // "@typescript-eslint/indent": "off"
55
+ },
56
+ "overrides" : [
57
+ {
58
+ "files" : [
59
+ " *.{c,m,}{t,j}s" ,
60
+ " *.{t,j}sx"
61
+ ]
62
+ },
63
+ {
64
+ "files" : [
65
+ " *{test,spec}.{t,j}s?(x)"
66
+ ],
67
+ "env" : {
68
+ "jest" : true
69
+ }
70
+ }
71
+ ]
36
72
}
0 commit comments