If ESLint is running in the terminal but not inside VSCode, it is probably because the extension is unable to detect both the local and the global node_modules folders.

To verify, press Ctrl+Shift+U in VSCode to open the Output panel after opening a JavaScript file with a known eslint issue. If it shows Failed to load the ESLint library for the document {documentName}.js -or- if the Problems tab shows an error or a warning that refers to eslint, then VSCode is having a problem trying to detect the path.

If yes, then set it manually by configuring the eslint.nodePath in the VSCode settings (settings.json). Give it the full path (for example, like "eslint.nodePath": "C:\\Program Files\\nodejs") -- using environment variables is currently not supported.
This option has been documented at the ESLint extension page.

Answer from ParaBolt on Stack Overflow
🌐
DEV Community
dev.to › tillsanders › eslint-not-working-in-vscode-help-build-a-troubleshooting-checklist-fdc
ESLint not working in VSCode? Help build a troubleshooting checklist! - DEV Community
January 11, 2021 - The problem I've found by inspecting the VSCode ESlint log was that some of my plugin settings were out of date and breaking it... so the ESlint service on VSCode was not starting. What I had to do was remove the extensions property from the eslint....
🌐
GitHub
github.com › microsoft › vscode-eslint › issues › 1856
vscode-eslint extension not working on latest version of VSCode, v1.90.0 · Issue #1856 · microsoft/vscode-eslint
June 7, 2024 - When saving a file, the extension hangs indefinitely without much indication in the ESLint Output of what could be going on. This is an issue I've noticed happening in the last two days or so, and it seems to coincide with updating to the May 2024 release of VSCode, v1.90.0.
Published   Jun 07, 2024
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
ESLint - Visual Studio Marketplace
Extension for Visual Studio Code - Integrates ESLint JavaScript into VS Code.
🌐
Dave Ceddia
daveceddia.com › vscode-use-eslintrc
ESLint + VSCode: How to Format Your Code Using .eslintrc
Open up VSCode’s settings. On a Mac, press Cmd+, or get there through the menus: Code > Preferences > Settings. It’ll open the fancy settings editor, but we need the raw JSON settings file instead. Click that tiny icon in the top-right that looks like a piece of paper with a little arrow. Add these 4 new lines inside the top-level settings object: { // ... "eslint.format.enable": true, "editor.codeActionsOnSave": { "source.fixAll.eslint": true } }
🌐
GitHub
github.com › eslint › eslint › discussions › 18362
Linting in VSCode doesn't work, but CLI is fine · eslint/eslint · Discussion #18362
If you are using yarn or pnpm instead of npm set the setting `eslint.packageManager` to either `yarn` or `pnpm` You need to reopen VS Code after installing eslint. Beta Was this translation helpful?
Author   eslint
🌐
DEV Community
dev.to › bonnie › eslint-prettier-and-vscode-troubleshooting-ljh
ESLint, Prettier and VSCode Troubleshooting - DEV Community
June 3, 2022 - Make sure the default formatter in VSCode Settings is set to ESLint. Check both the User settings and the Workspace settings (Workspace takes precedence over User).
Find elsewhere
🌐
Medium
medium.com › @sebasqui1995 › troubleshooting-eslint-in-vscode-on-macos-a-comprehensive-guide-9e52ecb030e4
Troubleshooting ESLint in VSCode on MacOS: A Comprehensive Guide | by Sebas Quiroga | Medium
December 3, 2025 - After making changes, restart VSCode to apply the modifications. Go to Code — Check For Updates and verify that there are no warnings about the inability to update. By following these comprehensive steps, you should resolve ESLint issues in your VSCode on MacOS, creating a smoother development environment for your JavaScript projects.
🌐
Untitled Publication
blog.anja-stricker.de › solving-eslint-problems
Solving ESLint Problems - VS Code Extension
July 29, 2023 - I tried narrowing down the issue, and it looked like I was not able to resolve typed problems by @typescript-eslint/parser, but why are the other ones working!? I tried following the ESLint installation site. Changing paths.
🌐
GitHub
github.com › microsoft › vscode-eslint › issues › 1620
VSCode doesn't run ESLint Server with eslint.config.js flat config · Issue #1620 · microsoft/vscode-eslint
March 13, 2023 - VSCode is not running ESLint server on my codebase when using the new ESLint Flat Config eslint.config.js. I have the following setup: The app is a Vite + Svelte + TS starter The issue happens in a monorepo (pnpm workspace) ESLint correc...
Published   Mar 13, 2023
🌐
GitHub
github.com › eslint › eslint › issues › 18672
Bug: Eslint stopped working in VSCode and Vite / React project · Issue #18672 · eslint/eslint
July 8, 2024 - You must be signed in to change notification settings · Fork 4.9k · Star 27.1k · New issueCopy link · New issueCopy link · Closed · Closed · Bug: Eslint stopped working in VSCode and Vite / React project#18672 · Copy link · Labels · questionThis issue asks a question about ESLintThis issue asks a question about ESLint ·
Published   Jul 08, 2024
🌐
DigitalOcean
digitalocean.com › community › tutorials › linting-and-formatting-with-eslint-in-vs-code
How To Lint and Format Code with ESLint in Visual Studio Code | DigitalOcean
October 17, 2024 - Using the npm init command to initialize your project will create a package.json file in the vscode-eslint-example directory. The package.json will store your project dependencies and other important configuration settings for your project. Now that your JavaScript project is properly set up, you can now set up ESLint.
Top answer
1 of 2
6

This may be because of a change in version 48.2.0 of the extensions that was released on Feb 20. Changelog

Remove automatic configuration of eslint.nodePath and eslintrc.json

To get it back, there are some basic instructions in the SF VS Code docs: https://developer.salesforce.com/tools/vscode/en/lwc/writing/#linting

This is what I've done to set-up ESLint manually. You'll need Node.js installed.

package.json file

If your SFDX project doesn't have a package.json file, the process works better (less warnings) if you add one first.

In the root of your SFDX project run

npm init

See the LWC recipes repo for a reference package.json

ESLint

In the root of your SFDX project run

npm install eslint babel-eslint @lwc/eslint-plugin-lwc --save-dev
npm install eslint @salesforce/eslint-config-lwc --save-dev

At this point ESLint should be working in VS Code again.

One other thing is that when ESLint was auto-configured, it was using version 5 and currently the latest version is 6.8. Some of the recommended rules changed between version 5 and version 6, including the no-console rule. To get the no-console rule back, the .eslintrc.json file in your lwc directories needs to be updated to

{
  "extends": ["@salesforce/eslint-config-lwc/recommended"],
  "rules": {
    "no-console": "error"
  }
}
2 of 2
1

You get this error because eslint is not able to find salesforce/eslint-config-lwc module. You need to install eslint and related config modules on every project, or you can install them globally.

npm install -g eslint babel-eslint @lwc/eslint-plugin-lwc @salesforce/eslint-config-lwc

and here is the .eslintrc.json config file that can be used for linting LWC components:

{
    "env": {
        "browser": true
    },
    "parser": "babel-eslint",

    "plugins": ["@lwc/eslint-plugin-lwc"],
    "extends": ["@salesforce/eslint-config-lwc/recommended"],

    "rules": {
        "quotes": [2, "double", { "avoidEscape": true }],
        "quote-props": [2, "consistent-as-needed"],
        "lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }]
    }
}

For linting Aura components it's required to install different npm module:

npm install -g @salesforce/eslint-plugin-aura

and use slightly different .eslintrc.json config:

{
    "env": {
        "browser": true
    },

    "plugins": [ "@salesforce/eslint-plugin-aura" ],
    "extends": [ "plugin:@salesforce/eslint-plugin-aura/recommended" ],

    "rules": {
        "strict": 0,
        "no-unused-expressions": 0,
        "quotes": [2, "double", { "avoidEscape": true }],
        "quote-props": [2, "consistent-as-needed"],
    }
}

🌐
Robin Wieruch
robinwieruch.de › vscode-eslint
How to use ESLint in VSCode
How to install ESLint for VS Code (Visual Studio Code). Install ESLint, configure it per project, and use a local .prettierrc file ...
🌐
LinuxPip
linuxpip.org › eslint-not-working-in-vscode
ESLint not working in VSCode – possible fixes – LinuxPip
In VSCode, open the terminal by pressing Ctrl+` keyboard combination. Select ESLint from the terminal channel dropdown. In here, you would find useful debugging information such as errors, warnings, etc. For example, missing .eslintrc-.json throw this error: Also, remember to check whether the ESLint extension is enabled globally or not. This helped me troubleshoot ESlint setup on a Typescript project. Great work...
🌐
Reddit
reddit.com › r/vscode › vscode linter stops working randomly and won't start again
r/vscode on Reddit: VSCode linter stops working randomly and won't start again
April 19, 2024 -

I have started using typescript recently. The other day I found the linter started showing an error at the beginning of the tsconfig file (I can't remember what it was).

I restarted VSCode and it disappeared, and then noticed all linting had stopped. This included other projects, vanilla JS, and other languages (Shopify liquid for example).

I completely removed VSCode from my system including all related directories. This fixed it but it meant losing my installed extensions, etc.

A day later it's happened again. It began with the weird error in tsconfig, I restarted, and then the linter is no longer working.

I have tried restarting the linter server, and also installed the ESLint extension (I'm not sure why this is a thing seeing VSCode has a linter, right?). I tried installing eslint globally with npm install -g eslint and also created a config file in the project with npx eslint --init.

Has anyone had this issue and/or can suggest a fix other than re-installing VSCode?

🌐
GitHub
github.com › microsoft › vscode-eslint › issues › 769
ESLint not working no matter how i try to fix · Issue #769 · microsoft/vscode-eslint
August 15, 2019 - And I also get this error while I'm trying to fix the problems by myself: "Failed to load plugin 'node' declared in 'starter.eslintrc.json': Cannot find module 'eslint-plugin-node'"
Published   Oct 02, 2019
🌐
Developer Community
developercommunity.visualstudio.com › content › problem › 208601 › eslint-for-javascript-code-randomly-stops-working.html
Eslint for JavaScript code randomly stops working, which ...
Skip to main content · Microsoft · Visual Studio · Sign in · You need to enable JavaScript to run this app · Sorry this browser is no longer supported · Please use any other modern browser like 'Microsoft Edge'
🌐
GitHub
github.com › Microsoft › vscode-eslint › issues › 178
ESLINT not working at all for VSCODE · Issue #178 · microsoft/vscode-eslint
December 6, 2016 - For a while, this plugin was working great. But recently it has been completely useless. ESLINT errors are not showing, except when I delete the plugin, and re-install it. Than I see the errors, but when I fix one of the errors, it does not get updated to reflect the fixes.
Published   Dec 06, 2016