@@ -5,20 +5,27 @@ import { commonJsFiles, jsExtensions, typescriptFiles } from "~/files";
5
5
export const settings : Linter . Config = {
6
6
plugins : [ "import" ] ,
7
7
8
- extends : [ "plugin:import/errors" , "plugin:import/warnings "] ,
8
+ extends : [ "plugin:import/recommended " ] ,
9
9
10
10
rules : {
11
+ "import/consistent-type-specifier-style" : [ "error" , "prefer-inline" ] ,
11
12
"import/default" : "error" ,
12
- "import/dynamic-import-chunkname" : [
13
- "off" ,
13
+ "import/dynamic-import-chunkname" : "off" ,
14
+ "import/export" : "error" ,
15
+ "import/exports-last" : "off" ,
16
+ "import/extensions" : [
17
+ "error" ,
18
+ "always" ,
14
19
{
15
- importFunctions : [ ] ,
16
- webpackChunknameFormat : "[0-9a-zA-Z-_/.]+" ,
20
+ js : "never" ,
21
+ ts : "never" ,
22
+ cts : "never" ,
23
+ cjs : "never" ,
24
+ mts : "always" ,
25
+ mjs : "always" ,
26
+ json : "always" ,
17
27
} ,
18
28
] ,
19
- "import/export" : "error" ,
20
- "import/exports-last" : "off" ,
21
- "import/extensions" : "off" ,
22
29
"import/first" : "error" ,
23
30
"import/group-exports" : "off" ,
24
31
"import/max-dependencies" : [
@@ -37,30 +44,15 @@ export const settings: Linter.Config = {
37
44
"import/newline-after-import" : "error" ,
38
45
"import/no-absolute-path" : "error" ,
39
46
"import/no-amd" : "error" ,
40
- "import/no-anonymous-default-export" : [
41
- "off" ,
42
- {
43
- allowAnonymousClass : false ,
44
- allowAnonymousFunction : false ,
45
- allowArray : false ,
46
- allowArrowFunction : false ,
47
- allowLiteral : false ,
48
- allowObject : false ,
49
- } ,
50
- ] ,
47
+ "import/no-anonymous-default-export" : "off" ,
51
48
"import/no-commonjs" : "off" ,
52
49
// Should be safe when bundling.
53
50
"import/no-cycle" : "off" ,
54
- // "import/no-cycle": [
55
- // "error",
56
- // {
57
- // ignoreExternal: true,
58
- // },
59
- // ],
60
51
"import/no-default-export" : "off" ,
61
52
"import/no-deprecated" : "warn" ,
62
- "import/no-duplicates" : "error" ,
53
+ "import/no-duplicates" : [ "error" , { "prefer-inline" : true } ] ,
63
54
"import/no-dynamic-require" : "error" ,
55
+ "import/no-empty-named-blocks" : "error" ,
64
56
"import/no-extraneous-dependencies" : [
65
57
"error" ,
66
58
{
@@ -93,12 +85,7 @@ export const settings: Linter.Config = {
93
85
peerDependencies : true ,
94
86
} ,
95
87
] ,
96
- "import/no-internal-modules" : [
97
- "off" ,
98
- {
99
- allow : [ ] ,
100
- } ,
101
- ] ,
88
+ "import/no-internal-modules" : "off" ,
102
89
"import/no-mutable-exports" : "error" ,
103
90
"import/no-named-as-default" : "off" ,
104
91
// using unicorn/import-style for per package control
@@ -111,19 +98,12 @@ export const settings: Linter.Config = {
111
98
"import/no-restricted-paths" : "off" ,
112
99
"import/no-self-import" : "error" ,
113
100
"import/no-unassigned-import" : "error" ,
114
- "import/no-unused-modules" : [
115
- "off" ,
116
- {
117
- ignoreExports : [ ] ,
118
- missingExports : true ,
119
- unusedExports : true ,
120
- } ,
121
- ] ,
101
+ "import/no-unused-modules" : "off" ,
122
102
"import/no-useless-path-segments" : [
123
103
"error" ,
124
104
{
125
105
commonjs : true ,
126
- noUselessIndex : false ,
106
+ noUselessIndex : true ,
127
107
} ,
128
108
] ,
129
109
"import/no-webpack-loader-syntax" : "error" ,
0 commit comments