1
1
module . exports = {
2
2
root : true ,
3
+ env : {
4
+ es6 : true ,
5
+ node : true ,
6
+ } ,
3
7
extends : [
4
- 'kentcdodds' ,
8
+ 'eslint:recommended' ,
9
+ 'plugin:import/recommended' ,
5
10
'plugin:jest/recommended' ,
6
11
'plugin:jest-formatting/recommended' ,
7
12
'prettier' ,
@@ -33,6 +38,12 @@ module.exports = {
33
38
} ,
34
39
} ,
35
40
] ,
41
+ 'import/first' : 'error' ,
42
+ 'import/no-empty-named-blocks' : 'error' ,
43
+ 'import/no-extraneous-dependencies' : 'error' ,
44
+ 'import/no-mutable-exports' : 'error' ,
45
+ 'import/no-named-default' : 'error' ,
46
+ 'import/no-relative-packages' : 'warn' ,
36
47
} ,
37
48
overrides : [
38
49
{
@@ -46,6 +57,7 @@ module.exports = {
46
57
extends : [
47
58
'plugin:@typescript-eslint/recommended' ,
48
59
'plugin:@typescript-eslint/recommended-requiring-type-checking' ,
60
+ 'plugin:import/typescript' ,
49
61
] ,
50
62
rules : {
51
63
'@typescript-eslint/explicit-function-return-type' : 'off' ,
@@ -54,6 +66,24 @@ module.exports = {
54
66
{ argsIgnorePattern : '^_' } ,
55
67
] ,
56
68
'@typescript-eslint/no-use-before-define' : 'off' ,
69
+
70
+ // Import
71
+ // Rules enabled by `import/recommended` but are better handled by
72
+ // TypeScript and @typescript -eslint.
73
+ 'import/default' : 'off' ,
74
+ 'import/export' : 'off' ,
75
+ 'import/namespace' : 'off' ,
76
+ 'import/no-unresolved' : 'off' ,
77
+ } ,
78
+ settings : {
79
+ 'import/resolver' : {
80
+ node : {
81
+ extensions : [ '.js' , '.jsx' , '.ts' , '.tsx' ] ,
82
+ } ,
83
+ typescript : {
84
+ alwaysTryTypes : true ,
85
+ } ,
86
+ } ,
57
87
} ,
58
88
} ,
59
89
] ,
0 commit comments