Bug: ESLint
class should not load plugins already defined in plugins
#15079
Closed
Description
Environment
Node version: v16.9.1
npm version: v7.9.0
Local ESLint version: v7.32.0
Global ESLint version: Not found
Operating System: win32 10.0.19043
What parser are you using?
Default (Espree)
What did you do?
import {ESLint} from 'eslint'
new ESLint({
baseConfig: {
extends: [
'plugin:foo/preset',
],
},
plugins: {
foo: {
configs: {
preset: {}
}
}
}
})
What did you expect to happen?
No errors.
What actually happened?
The config-array-factory
is trying to load the plugin that I've set in the plugins
.
node:internal/modules/cjs/loader:933
const err = new Error(message);
^
Error: Failed to load plugin 'foo' declared in 'BaseConfig': Cannot find module 'eslint-plugin-foo'
Require stack:
- CWD\__placeholder__.js
Referenced from: BaseConfig
// ...
Participation
- I am willing to submit a pull request for this issue.
Additional comments
N/A
Metadata
Assignees
Labels
Type
Projects
Status
Complete