Skip to content

Work around ESLint plugin discovery issue #866

Closed
@gaearon

Description

@gaearon

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions