Use require.resolve to allow nested extend #1836
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Continues #582
If you will start to use config
{ extends: ["eslint-config-airbnb"] }
in the projecta
together with the following peer dependencieseslint-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 projectb
:/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
andreact
plugins intonode_modules
folder of the each project. This change helps to avoid it.