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:
- Ship our own bin script called
eslint that launches the "real" eslint with the right NODE_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 on npm 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 for react-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.
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:
eslintthat launches the "real"eslintwith the rightNODE_PATHor something (not sure if that would even work)node_modulesone 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.