Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forbid Webpack loader syntax in imports #803

Merged
merged 1 commit into from
Oct 22, 2016

Conversation

fson
Copy link
Contributor

@fson fson commented Sep 30, 2016

Enable the no-webpack-loader-syntax, (import-js/eslint-plugin-import#586) rule in eslint-config-react-app.

Fixes #733.

Test plan:
Add this to App.js:

import 'css!./App.css';

screen shot 2016-09-30 at 16 15 44

@fson
Copy link
Contributor Author

fson commented Sep 30, 2016

I don't know how to fix the e2e test. The changed peerDependencies are breaking it on npm@2 😕

@fson
Copy link
Contributor Author

fson commented Oct 11, 2016

Rebased and fixed the conflicts with master. Travis is still failing on Node v4 because of peerDependencies, but I couldn't reproduce that locally, even though I tried with the same version, node v4.6.0 (npm v2.15.9).

The package.json on the root folder depends on the local eslint-config-react-app package, so it should always be the latest version and the other packages are bootstrapped with Lerna, which should symlink them correctly. But on Travis it fails to install. I wonder if this could be because of caching of node_modules.

@gaearon
Copy link
Contributor

gaearon commented Oct 11, 2016

Cleared caches and restarted.

@gaearon gaearon added this to the 0.7.0 milestone Oct 11, 2016
@fson
Copy link
Contributor Author

fson commented Oct 11, 2016

The build is still failing, but with a different error now:

Successfully bootstrapped 5 packages.
+./node_modules/.bin/eslint --ignore-path .gitignore ./
Oops! Something went wrong! :(
ESLint couldn't find the plugin "eslint-plugin-import". This can happen for a couple different reasons:

This is really weird because ESLint runs right after npm install which definitely should install eslint-plugin-import from devDependencies.

@themre
Copy link
Contributor

themre commented Oct 11, 2016

I had a problem with installing devDeps because npm config node_env was
set to production which disabled installing devDeps. And I don't know was
this set because I didn't set this variable to production.

  1. okt. 2016 4:45 pop. je oseba "Ville Immonen" [email protected]
    napisala:

The build is still failing, but a different error now:

Successfully bootstrapped 5 packages.
+./node_modules/.bin/eslint --ignore-path .gitignore ./
Oops! Something went wrong! :(
ESLint couldn't find the plugin "eslint-plugin-import". This can happen for a couple different reasons:

This is really weird because ESLint runs right after npm install which
definitely should install eslint-plugin-import from devDependencies.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#803 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKV7ehymPb33DTsUNFSj1KE1xJWORRWfks5qy6DzgaJpZM4KLFpQ
.

@fson fson removed this from the 0.7.0 milestone Oct 12, 2016
Enable no-webpack-loader-syntax rule in eslint-config-react-app.
@fson fson added this to the 0.7.0 milestone Oct 22, 2016
@fson fson merged commit 2750090 into facebook:master Oct 22, 2016
@fson fson deleted the no-webpack-loader-syntax branch October 22, 2016 20:11
feiqitian pushed a commit to feiqitian/create-react-app that referenced this pull request Oct 25, 2016
Enable no-webpack-loader-syntax rule in eslint-config-react-app.
jarlef pushed a commit to jarlef/create-react-app that referenced this pull request Nov 28, 2016
Enable no-webpack-loader-syntax rule in eslint-config-react-app.
alexdriaguine pushed a commit to alexdriaguine/create-react-app that referenced this pull request Jan 23, 2017
Enable no-webpack-loader-syntax rule in eslint-config-react-app.
@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants