-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Work around ESLint plugin discovery issue #866
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
Comments
I see where you're coming from but wouldn't that leave somebody with a hack to deal with once you eject the app? |
It can be done much simpler. Just exclude I assume that you support only npm3+ aren't you? |
It should be removed as part of ejecting (we have a way to do that:
Nope, we support npm2 because that’s what ships with the stable Node right now. |
I expected this kind of answer, but as far as the issue is only about developer satisfaction, can we make it at least working only with npm3? I am so tempted with this because with npm3 we can solve just with removing some code, rather than adding more weirdness. |
Removing ESLint from We could give it a try though. |
Yes, I can try to play around it in next few days. P.S. Are you sure that bundledDependencies make install faster? I have tried to measure it and figured out that npm still downloads some data for them anyway. |
It's also worth saying that if anybody wants to help with the underlying issue, grind some coffee and head over to eslint/eslint#3458 to read (and perhaps propose a solution) as fixing this would benefit everyone who uses eslint with plugins, including |
I'm using my own fork of I thought about adding another key to |
This wont' work for |
Done. I have posted my results there |
What about making |
It was suggested in eslint/eslint#3458 (comment) that it would be possible to depend on ESLint plugins by changing the config from an ESLint shareable config to an ESLint plugin. Plugins can define both rules and configurations. I'm going to give this a try and open a PR so we can see if this solution would work for us. |
#993 implements the "configuration as a plugin" approach. I'm still having some issues with getting the plugin resolved correctly even with this approach, but it might related to how we use |
Feel free to remove bundledDeps. |
We need to figure out a better way to do the end to end tests. The Any ideas how to run the e2e experience when developing in a way that uses all the local packages, but doesn't use bundledDeps? |
Just copy folders by hand after npm install? That is, with |
Sounds like that could work. Or maybe symlink so you can even make changes without running the whole script from start again? |
¯_(ツ)_/¯ whatever works |
@fson Do we have any progress on this? |
@gaearon I commented about my concerns about the plugin approach here: #993 (comment). |
This doesn't seem to be a big problem with npm 3 now that we removed bundledDependencies. |
There seems to be no visible progress on eslint/eslint#3458, and since it’s disproportionally affecting our users, maybe we should try doing some hack. The biggest issue is that IDEs can’t discover local ESLint and its plugins because they're inside
node_modules/react-scripts/node_modules
.We could try a few things:
eslint
that launches the "real"eslint
with the rightNODE_PATH
or something (not sure if that would even work)node_modules
one level higher onnpm start
. This way it won't work right after installing but should work after the project is first started. Maybe we could even make that a postinstall script forreact-scripts
.Regardless of the chosen solution, I’d rather do a hack and fix it up later than keep telling people to install global packages.
The text was updated successfully, but these errors were encountered: