@@ -6,53 +6,59 @@ const config = {
66 'plugin:@typescript-eslint/eslint-recommended' ,
77 'plugin:@typescript-eslint/recommended' ,
88 'plugin:import/typescript' ,
9- 'react-app' ,
109 'prettier' ,
1110 ] ,
1211 env : {
13- es6 : true ,
12+ browser : true ,
13+ es2020 : true ,
1414 } ,
1515 parserOptions : {
16+ tsconfigRootDir : __dirname ,
1617 project : './tsconfig.base.json' ,
1718 sourceType : 'module' ,
19+ ecmaVersion : 2020 ,
1820 } ,
1921 settings : {
2022 'import/parsers' : {
2123 '@typescript-eslint/parser' : [ '.ts' , '.tsx' ] ,
2224 } ,
2325 'import/resolver' : {
24- node : true ,
25- typescript : {
26- project : 'packages/*/tsconfig.json' ,
27- } ,
26+ typescript : true ,
2827 } ,
2928 react : {
3029 version : 'detect' ,
3130 } ,
3231 } ,
3332 rules : {
34- 'react/jsx-key' : [ 'error' , { checkFragmentShorthand : true } ] ,
3533 '@typescript-eslint/ban-types' : 'off' ,
3634 '@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+ ] ,
3839 '@typescript-eslint/explicit-module-boundary-types' : 'off' ,
3940 '@typescript-eslint/no-empty-interface' : 'off' ,
4041 '@typescript-eslint/no-explicit-any' : 'off' ,
4142 '@typescript-eslint/no-non-null-assertion' : 'off' ,
4243 '@typescript-eslint/no-unnecessary-condition' : 'error' ,
4344 '@typescript-eslint/no-inferrable-types' : [
4445 'error' ,
45- {
46- ignoreParameters : true ,
47- } ,
46+ { ignoreParameters : true } ,
4847 ] ,
49- 'no-shadow' : 'error' ,
5048 'import/no-cycle' : 'error' ,
5149 'import/no-unresolved' : [ 'error' , { ignore : [ '^@tanstack/' ] } ] ,
5250 'import/no-unused-modules' : [ 'off' , { unusedExports : true } ] ,
5351 'no-redeclare' : 'off' ,
54- 'react-hooks/exhaustive-deps ' : 'error' ,
52+ 'no-shadow ' : 'error' ,
5553 } ,
54+ overrides : [
55+ {
56+ files : [ '**/*.test.{ts,tsx}' ] ,
57+ rules : {
58+ '@typescript-eslint/no-unnecessary-condition' : 'off' ,
59+ } ,
60+ } ,
61+ ] ,
5662}
5763
5864module . exports = config
0 commit comments