@@ -21,8 +21,7 @@ module.exports = {
21
21
22
22
parser : 'babel-eslint' ,
23
23
24
- // import plugin is temporarily disabled, scroll below to see why
25
- plugins : [ /*'import', */ 'flowtype' , 'jsx-a11y' , 'react' ] ,
24
+ plugins : [ 'import' , 'flowtype' , 'jsx-a11y' , 'react' ] ,
26
25
27
26
env : {
28
27
browser : true ,
@@ -170,6 +169,9 @@ module.exports = {
170
169
// This is probably fixable with a patch to eslint-loader.
171
170
// When file A is saved, we want to invalidate all files that import it
172
171
// *and* that currently have lint errors. This should fix the problem.
172
+ // (As an exception, import/no-webpack-loader-syntax can be enabled already
173
+ // because it doesn't depend on whether the file exists, so this issue
174
+ // doesn't apply to it.)
173
175
174
176
// 'import/default': 'warn',
175
177
// 'import/export': 'warn',
@@ -181,6 +183,9 @@ module.exports = {
181
183
// 'import/no-named-as-default': 'warn',
182
184
// 'import/no-named-as-default-member': 'warn',
183
185
// 'import/no-unresolved': ['warn', { commonjs: true }],
186
+ // We don't support configuring Webpack using import source strings, so this
187
+ // is always an error.
188
+ 'import/no-webpack-loader-syntax' : 'error' ,
184
189
185
190
// https://github.com/yannickcr/eslint-plugin-react/tree/master/docs/rules
186
191
'react/jsx-equals-spacing' : [ 'warn' , 'never' ] ,
0 commit comments