Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
27500900
Commit
27500900
authored
8 years ago
by
Ville Immonen
Committed by
GitHub
8 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Forbid Webpack loader syntax in imports (#803)
Enable no-webpack-loader-syntax rule in eslint-config-react-app.
parent
d5de99e0
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/eslint-config-react-app/index.js
+7
-2
packages/eslint-config-react-app/index.js
with
7 additions
and
2 deletions
+7
-2
packages/eslint-config-react-app/index.js
+
7
-
2
View file @
27500900
...
...
@@ -21,8 +21,7 @@ module.exports = {
parser
:
'
babel-eslint
'
,
// import plugin is temporarily disabled, scroll below to see why
plugins
:
[
/*'import', */
'
flowtype
'
,
'
jsx-a11y
'
,
'
react
'
],
plugins
:
[
'
import
'
,
'
flowtype
'
,
'
jsx-a11y
'
,
'
react
'
],
env
:
{
browser
:
true
,
...
...
@@ -170,6 +169,9 @@ module.exports = {
// This is probably fixable with a patch to eslint-loader.
// When file A is saved, we want to invalidate all files that import it
// *and* that currently have lint errors. This should fix the problem.
// (As an exception, import/no-webpack-loader-syntax can be enabled already
// because it doesn't depend on whether the file exists, so this issue
// doesn't apply to it.)
// 'import/default': 'warn',
// 'import/export': 'warn',
...
...
@@ -181,6 +183,9 @@ module.exports = {
// 'import/no-named-as-default': 'warn',
// 'import/no-named-as-default-member': 'warn',
// 'import/no-unresolved': ['warn', { commonjs: true }],
// We don't support configuring Webpack using import source strings, so this
// is always an error.
'
import/no-webpack-loader-syntax
'
:
'
error
'
,
// https://github.com/yannickcr/eslint-plugin-react/tree/master/docs/rules
'
react/jsx-equals-spacing
'
:
[
'
warn
'
,
'
never
'
],
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets