@@ -2,26 +2,45 @@ module.exports = {
2
2
extends : [
3
3
'plugin:@newrelic/eslint-plugin-newrelic/react' ,
4
4
'plugin:@newrelic/eslint-plugin-newrelic/prettier' ,
5
- 'plugin:@typescript-eslint/recommended' ,
6
5
'plugin:jsx-a11y/recommended' ,
7
6
'plugin:react-hooks/recommended' ,
8
7
] ,
9
- plugins : [ 'react' , 'jsx-a11y' , '@typescript-eslint' , ' graphql'] ,
8
+ plugins : [ 'react' , 'jsx-a11y' , 'graphql' ] ,
10
9
settings : {
11
10
react : {
12
11
version : 'detect' ,
13
12
} ,
14
13
} ,
15
-
16
- parser : '@typescript-eslint/parser' ,
14
+ overrides : [
15
+ {
16
+ files : [ '*.ts' , '*.tsx' ] ,
17
+ extends : [
18
+ 'plugin:@typescript-eslint/recommended' ,
19
+ 'plugin:@typescript-eslint/recommended-requiring-type-checking' ,
20
+ ] ,
21
+ parserOptions : {
22
+ project : [ './tsconfig.json' ] ,
23
+ tsconfigRootDir : __dirname ,
24
+ } ,
25
+ rules : {
26
+ '@typescript-eslint/no-var-requires' : 2 ,
27
+ '@typescript-eslint/no-empty-function' : 2 ,
28
+ '@typescript-eslint/explicit-module-boundary-types' : 2 ,
29
+ '@typescript-eslint/explicit-function-return-type' : 2 ,
30
+ '@typescript-eslint/no-unsafe-argument' : 2 ,
31
+ '@typescript-eslint/no-use-before-define' : 2 ,
32
+ '@typescript-eslint/no-explicit-any' : 2 ,
33
+ '@typescript-eslint/camelcase' : 2 ,
34
+ } ,
35
+ } ,
36
+ ] ,
17
37
parserOptions : {
18
- files : [ '*.ts' , '*.tsx' , '*. js', '*.jsx' ] ,
38
+ files : [ '*.js' , '*.jsx' ] ,
19
39
ecmaFeatures : {
20
40
jsx : true ,
21
41
} ,
22
42
ecmaVersion : 2018 ,
23
43
sourceType : 'module' ,
24
- project : [ './tsconfig.json' ] ,
25
44
} ,
26
45
env : {
27
46
browser : true ,
@@ -46,16 +65,5 @@ module.exports = {
46
65
'jsx-a11y/no-onchange' : 'off' ,
47
66
'react/react-in-jsx-scope' : 'off' ,
48
67
'react/prop-types' : 'off' ,
49
- '@typescript-eslint/no-var-requires' : 'off' ,
50
- '@typescript-eslint/no-empty-function' : 'off' ,
51
- '@typescript-eslint/explicit-module-boundary-types' : 1 ,
52
- '@typescript-eslint/explicit-function-return-type' : 1 ,
53
- '@typescript-eslint/no-unsafe-argument' : 1 ,
54
- '@typescript-eslint/no-use-before-define' : 'off' ,
55
- '@typescript-eslint/no-explicit-any' : 1 ,
56
-
57
- // As typescript continuously gets added, we should
58
- // turn this back on.
59
- '@typescript-eslint/camelcase' : 'off' ,
60
68
} ,
61
69
} ;
0 commit comments