-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eslint extension keeps giving errors for a node_modules package - Failed to load config "./.config/eslint.config" to extend from #1182
Comments
@nbaleli-w does the validation happen correctly when you use eslint in the terminal. If this is the case can you please provide me with a GitHub repository I can clone that demos what you are experiencing. |
@nbaleli-w thanks. Can you provide me with a GitHub repository I can clone that demos what you are experiencing. |
@dbaeumer unfortunately for me I was unable to reproduce this in a fresh repo. |
Ive managed to create a repo for reproduction thus Im reopening this sue, thank you |
@nbaleli-w thanks for the repository. I am not able to reproduce this. Can you provide me with concrete steps |
@dbaeumer really no special steps, as soon as I open the VScode window of that workspace, this is what I see when I open the ESLint panel: |
Do you open a folder or the workspace file? |
@dbaeumer it is opened as a directory, not a workspace. any additional info I can add here ?
|
I guess this is a local issue? thanks for you time, @dbaeumer! |
Hi @nbaleli-w , did you manage to somehow fix the issue? I have started seeing the exact same issue and according to searching through issues here on GitHub I am not the only one. The issue is kind of annoying one, because vscode keeps showing notifications about this every few minutes. Here is the output I see in vscode for eslint (The project was shortend to
I am running on latest vscode, latest eslint + ts. |
I ended up doing a full wipe of vscode, and slowly putting my settings back.
I didnt have an issue since
…On Sun, Jul 18, 2021, 17:03 Aleš Menzel ***@***.***> wrote:
Hi @nbaleli-w <https://github.com/nbaleli-w> , did you manage to somehow
fix the issue? I have started seeing the exact same issue and according to
searching through issues here on GitHub I am not the only one. The issue is
kind of annoying one, because vscode keeps showing notifications about this
every few minutes.
Here is the output I see in vscode for eslint (The project was shortend to
<project> for readability)
[Error - 3:57:47 PM] Error: Failed to load config "./.config/eslint.config" to extend from.
Referenced from: ***@***.***/core/package.json
at configInvalidError ***@***.***/eslintrc/lib/config-array-factory.js:290:9)
at ConfigArrayFactory._loadExtendedShareableConfig ***@***.***/eslintrc/lib/config-array-factory.js:883:23)
at ConfigArrayFactory._loadExtends ***@***.***/eslintrc/lib/config-array-factory.js:781:25)
at ConfigArrayFactory._normalizeObjectConfigDataBody ***@***.***/eslintrc/lib/config-array-factory.js:720:25)
at _normalizeObjectConfigDataBody.next (<anonymous>)
at ConfigArrayFactory._normalizeObjectConfigData ***@***.***/eslintrc/lib/config-array-factory.js:665:20)
at _normalizeObjectConfigData.next (<anonymous>)
at ConfigArrayFactory.loadInDirectory ***@***.***/eslintrc/lib/config-array-factory.js:511:28)
at CascadingConfigArrayFactory._loadConfigInAncestors ***@***.***/eslintrc/lib/cascading-config-array-factory.js:379:46)
at CascadingConfigArrayFactory._loadConfigInAncestors ***@***.***/eslintrc/lib/cascading-config-array-factory.js:398:20)
I am running on latest vscode, latest eslint + ts.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1182 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANR3TPVXJXTZT5ERZF6APPTTYLNKTANCNFSM4XUHLV6A>
.
|
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 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:
Expected: No modal error dialog box. Here's the content of the output channel:
I'm happy to help you diagnose further-- let me know how I can help. Thanks! |
It is hard for the extension to decide which files to ignore and I stayed away from hardcoding any paths. If you run ESLint in the terminal you get the same:
The extension does respect |
I just added a one-line .eslintignore file to root of the folder created in the repro above, but I still see the error dialog. Here's the contents.
Is this correct? If so, can you repro the dialog on your end too? |
You can test the |
If I run only The problem seems to be that .eslintignore is itself ignored when you provide a specific filename (not a glob pattern) to ESLint. When you're running ESLint from the command line, this seems like appropriate behavior. But when the IDE is running ESLint on my behalf, it's frustrating to see a modal error dialog over code that's not mine and that I can't fix. I just published a repo that shows the two cases:
Instead of the current IDE behavior, I'd expect to see:
If the user wants to see details behind problems, they can click the status bar to get taken to the output pane to see details. |
I realized that my last point above wasn't specific to this problem but was a more general complaint about how errors are reported by the extension, so I moved it to a new issue #1322. |
@justingrant the reason why the |
the error
Error: Failed to load config "./.config/eslint.config" to extend from.
is flooding the output channel, showing popups none-stopIve tried looking everywhere for a solution, no luck yet -/
these are my configs:
error output:
eslinterror.txt
config file:
eslintrc.txt
verbose output:
verbose.txt
The text was updated successfully, but these errors were encountered: