Skip to content

Conversation

frenzzy
Copy link
Contributor

@frenzzy frenzzy commented Jun 22, 2018

Continues #582

If you will start to use config { extends: ["eslint-config-airbnb"] } in the project a together with the following peer dependencies eslint-plugin-import, eslint-plugin-jsx-a11y, eslint-plugin-react, then you will receive an error if you will try to extend this config in the project b:

/projects/a/.eslintrc Referenced from: /projects/b/.eslintrc
[Error] Failed to load plugin /projects/a/node_modules/eslint-plugin-jsx-a11y/lib/index.js: Cannot find module 'eslint-plugin-/projects/a/node_modules/eslint-plugin-jsx-a11y/lib/index.js' Referenced from: /projects/b/.eslintrc

This issue is probably actual for monorepos. For example it is not cool to install import, jsx-a11y and react plugins into node_modules folder of the each project. This change helps to avoid it.

Copy link
Collaborator

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid this will break a lot of things.

These plugins are peer dependencies - they are required to be installed in the top-level project.

To change this, eslint itself would have to change - it's not something a shared config can work around.

@ljharb ljharb closed this Jun 23, 2018
@frenzzy frenzzy deleted the require-resolve branch June 23, 2018 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants