Plugins that are a dependency to a config package that aren't hoisted can't be loaded #13500
Labels
archived due to age
This issue has been archived; please open a new issue for any further discussion
core
Relates to ESLint's core APIs and features
evaluating
The team will evaluate this issue to decide whether it meets the criteria for inclusion
Tell us about your environment
Environment Info:
Node version: v13.11.0
npm version: v6.14.5
Local ESLint version: v7.4.0 (Currently used)
Global ESLint version: Not found
What parser (default, Babel-ESLint, etc.) are you using? I think default, but not relevant.
Please show your full configuration:
https://github.com/freaktechnik/transifex-loader/blob/master/src/.eslintrc.json
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
Run eslint (npx eslint or npm run lint:js in that project).
What did you expect to happen?
Eslint to happily lint the project.
What actually happened? Please include the actual, raw output from ESLint.
Having plugins as dependencies of configs is working fine - in fact eslint happily loads a bunch of them before this. However, those plugins were all hoisted, this plugin is not. It is in
/home/martin/dev/transifex-loader/node_modules/@freaktechnik/eslint-config-webpack/node_modules/eslint-plugin-import
.In order for the non-hoisted plugin to work
eslint/lib/cli-engine/config-array-factory.js
Lines 864 to 868 in ada2c89
pluginBasePath
to the dirname of the config. I've verified that that makes everything work as expected. However that might break configs that expect their extends/plugins to be peer dependencies, I guess?Are you willing to submit a pull request to fix this bug?
Sure, if this behavior is deemed incorrect (which I hope it is, since it makes eslint configs much more useful and not accidentally broken in a weird edge case). However I would need guidance toward how to/what to test.
The text was updated successfully, but these errors were encountered: