Work around ESLint plugin discovery issue
See original GitHub issueThere seems to be no visible progress on https://github.com/eslint/eslint/issues/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:
- Ship our own bin script called
eslint
that launches the “real”eslint
with the rightNODE_PATH
or something (not sure if that would even work) - Mess with npm internal state and copy all ESLint folders in
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
. - Something else crazy.
Regardless of the chosen solution, I’d rather do a hack and fix it up later than keep telling people to install global packages.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:21 (20 by maintainers)
Top Results From Across the Web
Working with Plugins - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >How to write an ESLint plugin in TypeScript - Darragh ORiordan
I use NestJS at my day job. It's a complicated framework sometimes and there are lots of things that devs “just have to...
Read more >ESLint fails to load plugins when using ESLint 6.x #696 - GitHub
Failed to load plugin prettier: Cannot find module 'eslint-plugin-prettier' Happened while validating foo.tsx This can happen for a couple of ...
Read more >Using ESLint to improve your app's performance · allegro.tech
But my curiosity told me to search through our git repository and as a result I discovered multiple usages of Intl.DateTimeFormat without ...
Read more >How to Prevent Accidental Code Errors with ESLint, Prettier ...
Make Prettier work with ESLint and Husky to protect the code of your project ... Default ESLint config in the package.json file for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It should be removed as part of ejecting (we have a way to do that:
// @remove-on-eject-begin
and// @remove-on-eject-end
).Nope, we support npm2 because that’s what ships with the stable Node right now.
¯_(ツ)_/¯ whatever works