@@ -4,7 +4,7 @@ module.exports = {
4
4
es6 : true ,
5
5
jest : true ,
6
6
} ,
7
- extends : [ 'airbnb' , 'plugin:react/recommended' , 'prettier' ] ,
7
+ extends : [ 'airbnb' , 'plugin:react/recommended' , 'prettier' , 'plugin:import/recommended' ] ,
8
8
globals : {
9
9
Atomics : 'readonly' ,
10
10
SharedArrayBuffer : 'readonly' ,
@@ -16,7 +16,7 @@ module.exports = {
16
16
ecmaVersion : 2018 ,
17
17
sourceType : 'module' ,
18
18
} ,
19
- plugins : [ 'prettier' , 'react' , 'babel' , 'react-hooks' , 'only-warn' ] ,
19
+ plugins : [ 'prettier' , 'react' , 'babel' , 'react-hooks' , 'only-warn' , 'import' ] ,
20
20
parser : 'babel-eslint' ,
21
21
rules : {
22
22
'react/prefer-stateless-function' : 'off' ,
@@ -31,7 +31,8 @@ module.exports = {
31
31
'import/no-extraneous-dependencies' : 0 ,
32
32
'linebreak-style' : [ 'error' , 'unix' ] ,
33
33
'jsx-a11y/click-events-have-key-events' : 'off' ,
34
- 'prettier/prettier' : [ 'warn' ]
34
+ 'prettier/prettier' : [ 'warn' ] ,
35
+ 'import/no-unresolved' : [ 2 , { commonjs : true , amd : true } ] ,
35
36
} ,
36
37
settings : {
37
38
'import/resolver' : {
@@ -48,6 +49,8 @@ module.exports = {
48
49
'plugin:react/recommended' ,
49
50
'plugin:@typescript-eslint/eslint-recommended' ,
50
51
'plugin:@typescript-eslint/recommended' ,
52
+ 'plugin:import/recommended' ,
53
+ 'plugin:import/typescript' ,
51
54
] ,
52
55
globals : { Atomics : 'readonly' , SharedArrayBuffer : 'readonly' } ,
53
56
parser : '@typescript-eslint/parser' ,
@@ -69,6 +72,18 @@ module.exports = {
69
72
'react/jsx-props-no-spreading' : 0 ,
70
73
'react/no-array-index-key' : 0 ,
71
74
'react/require-default-props' : 0 ,
75
+ 'import/extensions' : [
76
+ 'error' ,
77
+ 'ignorePackages' ,
78
+ {
79
+ js : 'never' ,
80
+ jsx : 'never' ,
81
+ ts : 'never' ,
82
+ tsx : 'never' ,
83
+ } ,
84
+ ] ,
85
+ 'no-use-before-define' : 'off' ,
86
+ '@typescript-eslint/no-use-before-define' : [ 'error' ] ,
72
87
} ,
73
88
plugins : [ '@typescript-eslint' ] ,
74
89
} ,
0 commit comments