@@ -33,40 +33,40 @@ module.exports = {
33
33
// Static analysis:
34
34
35
35
// ensure imports point to files/modules that can be resolved
36
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/no-unresolved.md
36
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/no-unresolved.md
37
37
'import/no-unresolved' : [ 'error' , { commonjs : true , caseSensitive : true } ] ,
38
38
39
39
// ensure named imports coupled with named exports
40
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/named.md#when-not-to-use-it
40
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/named.md#when-not-to-use-it
41
41
'import/named' : 'error' ,
42
42
43
43
// ensure default import coupled with default export
44
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/default.md#when-not-to-use-it
44
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/default.md#when-not-to-use-it
45
45
'import/default' : 'off' ,
46
46
47
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/namespace.md
47
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/namespace.md
48
48
'import/namespace' : 'off' ,
49
49
50
50
// Helpful warnings:
51
51
52
52
// disallow invalid exports, e.g. multiple defaults
53
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/export.md
53
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/export.md
54
54
'import/export' : 'error' ,
55
55
56
56
// do not allow a default import name to match a named export
57
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/no-named-as-default.md
57
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/no-named-as-default.md
58
58
'import/no-named-as-default' : 'error' ,
59
59
60
60
// warn on accessing default export property names that are also named exports
61
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/no-named-as-default-member.md
61
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/no-named-as-default-member.md
62
62
'import/no-named-as-default-member' : 'error' ,
63
63
64
64
// disallow use of jsdoc-marked-deprecated imports
65
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/no-deprecated.md
65
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/no-deprecated.md
66
66
'import/no-deprecated' : 'off' ,
67
67
68
68
// Forbid the use of extraneous packages
69
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md
69
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md
70
70
// paths are treated both as absolute paths, and relative to process.cwd()
71
71
'import/no-extraneous-dependencies' : [ 'error' , {
72
72
devDependencies : [
@@ -97,109 +97,109 @@ module.exports = {
97
97
} ] ,
98
98
99
99
// Forbid mutable exports
100
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/no-mutable-exports.md
100
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/no-mutable-exports.md
101
101
'import/no-mutable-exports' : 'error' ,
102
102
103
103
// Module systems:
104
104
105
105
// disallow require()
106
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/no-commonjs.md
106
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/no-commonjs.md
107
107
'import/no-commonjs' : 'off' ,
108
108
109
109
// disallow AMD require/define
110
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/no-amd.md
110
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/no-amd.md
111
111
'import/no-amd' : 'error' ,
112
112
113
113
// No Node.js builtin modules
114
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/no-nodejs-modules.md
114
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/no-nodejs-modules.md
115
115
// TODO: enable?
116
116
'import/no-nodejs-modules' : 'off' ,
117
117
118
118
// Style guide:
119
119
120
120
// disallow non-import statements appearing before import statements
121
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/first.md
121
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/first.md
122
122
'import/first' : 'error' ,
123
123
124
124
// disallow non-import statements appearing before import statements
125
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/imports-first.md
125
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/imports-first.md
126
126
// deprecated: use `import/first`
127
127
'import/imports-first' : 'off' ,
128
128
129
129
// disallow duplicate imports
130
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/no-duplicates.md
130
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/no-duplicates.md
131
131
'import/no-duplicates' : 'error' ,
132
132
133
133
// disallow namespace imports
134
134
// TODO: enable?
135
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/no-namespace.md
135
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/no-namespace.md
136
136
'import/no-namespace' : 'off' ,
137
137
138
138
// Ensure consistent use of file extension within the import path
139
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/extensions.md
139
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/extensions.md
140
140
'import/extensions' : [ 'error' , 'ignorePackages' , {
141
141
js : 'never' ,
142
142
mjs : 'never' ,
143
143
jsx : 'never' ,
144
144
} ] ,
145
145
146
146
// ensure absolute imports are above relative imports and that unassigned imports are ignored
147
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/order.md
147
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/order.md
148
148
// TODO: enforce a stricter convention in module import order?
149
149
'import/order' : [ 'error' , { groups : [ [ 'builtin' , 'external' , 'internal' ] ] } ] ,
150
150
151
151
// Require a newline after the last import/require in a group
152
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/newline-after-import.md
152
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/newline-after-import.md
153
153
'import/newline-after-import' : 'error' ,
154
154
155
155
// Require modules with a single export to use a default export
156
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md
156
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md
157
157
'import/prefer-default-export' : 'error' ,
158
158
159
159
// Restrict which files can be imported in a given folder
160
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/no-restricted-paths.md
160
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/no-restricted-paths.md
161
161
'import/no-restricted-paths' : 'off' ,
162
162
163
163
// Forbid modules to have too many dependencies
164
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/max-dependencies.md
164
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/max-dependencies.md
165
165
'import/max-dependencies' : [ 'off' , { max : 10 } ] ,
166
166
167
167
// Forbid import of modules using absolute paths
168
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md
168
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md
169
169
'import/no-absolute-path' : 'error' ,
170
170
171
171
// Forbid require() calls with expressions
172
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md
172
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md
173
173
'import/no-dynamic-require' : 'error' ,
174
174
175
175
// prevent importing the submodules of other modules
176
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/no-internal-modules.md
176
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/no-internal-modules.md
177
177
'import/no-internal-modules' : [ 'off' , {
178
178
allow : [ ] ,
179
179
} ] ,
180
180
181
181
// Warn if a module could be mistakenly parsed as a script by a consumer
182
182
// leveraging Unambiguous JavaScript Grammar
183
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/unambiguous.md
183
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/unambiguous.md
184
184
// this should not be enabled until this proposal has at least been *presented* to TC39.
185
185
// At the moment, it's not a thing.
186
186
'import/unambiguous' : 'off' ,
187
187
188
188
// Forbid Webpack loader syntax in imports
189
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/no-webpack-loader-syntax.md
189
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/no-webpack-loader-syntax.md
190
190
'import/no-webpack-loader-syntax' : 'error' ,
191
191
192
192
// Prevent unassigned imports
193
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/no-unassigned-import.md
193
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/no-unassigned-import.md
194
194
// importing for side effects is perfectly acceptable, if you need side effects.
195
195
'import/no-unassigned-import' : 'off' ,
196
196
197
197
// Prevent importing the default as if it were named
198
- // https://github.com/benmosher /eslint-plugin-import/blob/master/docs/rules/no-named-default.md
198
+ // https://github.com/import-js /eslint-plugin-import/blob/master/docs/rules/no-named-default.md
199
199
'import/no-named-default' : 'error' ,
200
200
201
201
// Reports if a module's default export is unnamed
202
- // https://github.com/benmosher /eslint-plugin-import/blob/d9b712ac7fd1fddc391f7b234827925c160d956f/docs/rules/no-anonymous-default-export.md
202
+ // https://github.com/import-js /eslint-plugin-import/blob/d9b712ac7fd1fddc391f7b234827925c160d956f/docs/rules/no-anonymous-default-export.md
203
203
'import/no-anonymous-default-export' : [ 'off' , {
204
204
allowArray : false ,
205
205
allowArrowFunction : false ,
@@ -210,49 +210,49 @@ module.exports = {
210
210
} ] ,
211
211
212
212
// This rule enforces that all exports are declared at the bottom of the file.
213
- // https://github.com/benmosher /eslint-plugin-import/blob/98acd6afd04dcb6920b81330114e146dc8532ea4/docs/rules/exports-last.md
213
+ // https://github.com/import-js /eslint-plugin-import/blob/98acd6afd04dcb6920b81330114e146dc8532ea4/docs/rules/exports-last.md
214
214
// TODO: enable?
215
215
'import/exports-last' : 'off' ,
216
216
217
217
// Reports when named exports are not grouped together in a single export declaration
218
218
// or when multiple assignments to CommonJS module.exports or exports object are present
219
219
// in a single file.
220
- // https://github.com/benmosher /eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/group-exports.md
220
+ // https://github.com/import-js /eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/group-exports.md
221
221
'import/group-exports' : 'off' ,
222
222
223
223
// forbid default exports. this is a terrible rule, do not use it.
224
- // https://github.com/benmosher /eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-default-export.md
224
+ // https://github.com/import-js /eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-default-export.md
225
225
'import/no-default-export' : 'off' ,
226
226
227
227
// Prohibit named exports. this is a terrible rule, do not use it.
228
- // https://github.com/benmosher /eslint-plugin-import/blob/1ec80fa35fa1819e2d35a70e68fb6a149fb57c5e/docs/rules/no-named-export.md
228
+ // https://github.com/import-js /eslint-plugin-import/blob/1ec80fa35fa1819e2d35a70e68fb6a149fb57c5e/docs/rules/no-named-export.md
229
229
'import/no-named-export' : 'off' ,
230
230
231
231
// Forbid a module from importing itself
232
- // https://github.com/benmosher /eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-self-import.md
232
+ // https://github.com/import-js /eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-self-import.md
233
233
'import/no-self-import' : 'error' ,
234
234
235
235
// Forbid cyclical dependencies between modules
236
- // https://github.com/benmosher /eslint-plugin-import/blob/d81f48a2506182738409805f5272eff4d77c9348/docs/rules/no-cycle.md
236
+ // https://github.com/import-js /eslint-plugin-import/blob/d81f48a2506182738409805f5272eff4d77c9348/docs/rules/no-cycle.md
237
237
'import/no-cycle' : [ 'error' , { maxDepth : '∞' } ] ,
238
238
239
239
// Ensures that there are no useless path segments
240
- // https://github.com/benmosher /eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/no-useless-path-segments.md
240
+ // https://github.com/import-js /eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/no-useless-path-segments.md
241
241
'import/no-useless-path-segments' : [ 'error' , { commonjs : true } ] ,
242
242
243
243
// dynamic imports require a leading comment with a webpackChunkName
244
- // https://github.com/benmosher /eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/dynamic-import-chunkname.md
244
+ // https://github.com/import-js /eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/dynamic-import-chunkname.md
245
245
'import/dynamic-import-chunkname' : [ 'off' , {
246
246
importFunctions : [ ] ,
247
247
webpackChunknameFormat : '[0-9a-zA-Z-_/.]+' ,
248
248
} ] ,
249
249
250
250
// Use this rule to prevent imports to folders in relative parent paths.
251
- // https://github.com/benmosher /eslint-plugin-import/blob/c34f14f67f077acd5a61b3da9c0b0de298d20059/docs/rules/no-relative-parent-imports.md
251
+ // https://github.com/import-js /eslint-plugin-import/blob/c34f14f67f077acd5a61b3da9c0b0de298d20059/docs/rules/no-relative-parent-imports.md
252
252
'import/no-relative-parent-imports' : 'off' ,
253
253
254
254
// Reports modules without any exports, or with unused exports
255
- // https://github.com/benmosher /eslint-plugin-import/blob/f63dd261809de6883b13b6b5b960e6d7f42a7813/docs/rules/no-unused-modules.md
255
+ // https://github.com/import-js /eslint-plugin-import/blob/f63dd261809de6883b13b6b5b960e6d7f42a7813/docs/rules/no-unused-modules.md
256
256
// TODO: enable once it supports CJS
257
257
'import/no-unused-modules' : [ 'off' , {
258
258
ignoreExports : [ ] ,
@@ -261,13 +261,13 @@ module.exports = {
261
261
} ] ,
262
262
263
263
// Reports the use of import declarations with CommonJS exports in any module except for the main module.
264
- // https://github.com/benmosher /eslint-plugin-import/blob/1012eb951767279ce3b540a4ec4f29236104bb5b/docs/rules/no-import-module-exports.md
264
+ // https://github.com/import-js /eslint-plugin-import/blob/1012eb951767279ce3b540a4ec4f29236104bb5b/docs/rules/no-import-module-exports.md
265
265
'import/no-import-module-exports' : [ 'error' , {
266
266
exceptions : [ ] ,
267
267
} ] ,
268
268
269
269
// Use this rule to prevent importing packages through relative paths.
270
- // https://github.com/benmosher /eslint-plugin-import/blob/1012eb951767279ce3b540a4ec4f29236104bb5b/docs/rules/no-relative-packages.md
270
+ // https://github.com/import-js /eslint-plugin-import/blob/1012eb951767279ce3b540a4ec4f29236104bb5b/docs/rules/no-relative-packages.md
271
271
'import/no-relative-packages' : 'error' ,
272
272
273
273
// enforce a consistent style for type specifiers (inline or top-level)
0 commit comments