@@ -6,53 +6,59 @@ const config = {
6
6
'plugin:@typescript-eslint/eslint-recommended' ,
7
7
'plugin:@typescript-eslint/recommended' ,
8
8
'plugin:import/typescript' ,
9
- 'react-app' ,
10
9
'prettier' ,
11
10
] ,
12
11
env : {
13
- es6 : true ,
12
+ browser : true ,
13
+ es2020 : true ,
14
14
} ,
15
15
parserOptions : {
16
+ tsconfigRootDir : __dirname ,
16
17
project : './tsconfig.base.json' ,
17
18
sourceType : 'module' ,
19
+ ecmaVersion : 2020 ,
18
20
} ,
19
21
settings : {
20
22
'import/parsers' : {
21
23
'@typescript-eslint/parser' : [ '.ts' , '.tsx' ] ,
22
24
} ,
23
25
'import/resolver' : {
24
- node : true ,
25
- typescript : {
26
- project : 'packages/*/tsconfig.json' ,
27
- } ,
26
+ typescript : true ,
28
27
} ,
29
28
react : {
30
29
version : 'detect' ,
31
30
} ,
32
31
} ,
33
32
rules : {
34
- 'react/jsx-key' : [ 'error' , { checkFragmentShorthand : true } ] ,
35
33
'@typescript-eslint/ban-types' : 'off' ,
36
34
'@typescript-eslint/ban-ts-comment' : 'off' ,
37
- '@typescript-eslint/consistent-type-imports' : 'error' ,
35
+ '@typescript-eslint/consistent-type-imports' : [
36
+ 'error' ,
37
+ { prefer : 'type-imports' } ,
38
+ ] ,
38
39
'@typescript-eslint/explicit-module-boundary-types' : 'off' ,
39
40
'@typescript-eslint/no-empty-interface' : 'off' ,
40
41
'@typescript-eslint/no-explicit-any' : 'off' ,
41
42
'@typescript-eslint/no-non-null-assertion' : 'off' ,
42
43
'@typescript-eslint/no-unnecessary-condition' : 'error' ,
43
44
'@typescript-eslint/no-inferrable-types' : [
44
45
'error' ,
45
- {
46
- ignoreParameters : true ,
47
- } ,
46
+ { ignoreParameters : true } ,
48
47
] ,
49
- 'no-shadow' : 'error' ,
50
48
'import/no-cycle' : 'error' ,
51
49
'import/no-unresolved' : [ 'error' , { ignore : [ '^@tanstack/' ] } ] ,
52
50
'import/no-unused-modules' : [ 'off' , { unusedExports : true } ] ,
53
51
'no-redeclare' : 'off' ,
54
- 'react-hooks/exhaustive-deps ' : 'error' ,
52
+ 'no-shadow ' : 'error' ,
55
53
} ,
54
+ overrides : [
55
+ {
56
+ files : [ '**/*.test.{ts,tsx}' ] ,
57
+ rules : {
58
+ '@typescript-eslint/no-unnecessary-condition' : 'off' ,
59
+ } ,
60
+ } ,
61
+ ] ,
56
62
}
57
63
58
64
module . exports = config
0 commit comments