santosh kumar patro
santosh kumar patro

Reputation: 8203

No ESLint configuration found for Visual Studio Code

I have installed the ESLint plugin for Visual Studio Code editor and it shows that it is installed also but still I see the error: No ESLint configuration found for Visual Studio Code at the top of the editor window as shown in the screenshot below:

enter image description here

enter image description here

Can anyone help me to know is there anything that I am missing here.

Upvotes: 14

Views: 22541

Answers (4)

Konrad Grzyb
Konrad Grzyb

Reputation: 1985

Upgrade issue 8.31 to 9.1

I upgraded eslint by mistake. Downgrade from 9.1 to 8.31 helped me. In order to upgare go trough migration guide https://eslint.org/docs/latest/use/migrate-to-9.0.0

Upvotes: 0

David Carboni
David Carboni

Reputation: 2146

Update for April 2024:

The eslint.experimental.useFlatConfig option is now deprecated in favour of eslint.useFlatConfig in settings.json:

"eslint.experimental.useFlatConfig": true,

At the time of writing you'll need to switch VSCode to use the pre-release version of the ESLint extension (v3.0.5).

See: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint (and for updates after I post this)

After a lot of foul cursing from me, directed first at the flat config destroying the last hour of my life and then at VSCode for giving me zero linting information this finally seems to have worked.

I hope it gives someone else a sigh of relief.

Upvotes: 11

Christopher Gertz
Christopher Gertz

Reputation: 2026

If anyone stumbles upon this in 2024:

I encountered this message today, having the "new" format eslint.config.js in my project but no .eslintrc.* (which is now deprecated)

I had to activate the new format in the plugin via adding this line in .vscode/settings.json

  "eslint.experimental.useFlatConfig": true,

The description of this option says "Enables support of experimental Flat Config (aka eslint.config.js, supported by ESLint version 8.21 or later)."

Upvotes: 15

Dauren Akilbekov
Dauren Akilbekov

Reputation: 5025

You are missing .eslintrc.* file. Which can be in different format js, json, yaml... There are two available methods to create configuration file

Upvotes: 18

Related Questions