vscode-eslint: eslint extension keeps giving errors for a node_modules package - Failed to load config "./.config/eslint.config" to extend from
the error Error: Failed to load config "./.config/eslint.config" to extend from.
is flooding the output channel, showing popups none-stop
Ive tried looking everywhere for a solution, no luck yet -/ these are my configs:
//this is a multiroot workspace
"eslint.workingDirectories": [
{
"directory": "client",
"changeProcessCWD": true
}
],
error output: eslinterror.txt
config file: eslintrc.txt
verbose output: verbose.txt
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 21 (9 by maintainers)
I can repro this problem at will. I removed my globally-installed ESLint and removed all ESLint settings from my user settings file, and the problem still reproes. The problem happens for me when I open a JS file in any node_modules package (let’s call it “A”) that extends from another package “B” where the “B” dependency is in
devDependencies
of “A”, which means that it’s not installed on my machine when Inpm install A
.Even if eslint isn’t working in code in node_modules, honestly I don’t care-- because it’s not my code so I can’t fix it! Ideally, the extension would:
Here’s repro steps:
npm init
the folder. Accept all the defaults.npm i serverless eslint
./node_modules/severless/lib/Serverless.js
Expected: No modal error dialog box. Actual: ESLint: Failed to load config “@serverless/eslint-config/node” to extend from. Referenced from: /Users/justingrant/Documents/hdev/repro/eslint-warning/node_modules/serverless/package.json. Please see the ‘ESLint’ output channel for details.
Here’s the content of the output channel:
I’m happy to help you diagnose further-- let me know how I can help. Thanks!
@justingrant the reason why the
.eslintignore
file doesn’t work in this case is that the ESLint npm module reads the config before inspecting the ignore file. This is document capture in https://github.com/microsoft/vscode-eslint/issues/1238