VS Code shows no ESLint errors after moving to eslint.config.js
npx eslint . prints errors but the editor shows no squigglesShort answer
The extension has its own settings and does not just run your terminal command. On ESLint 8.57 the extension still defaults to the old config format, a config in a subfolder needs eslint.workingDirectories, and a file type missing from eslint.validate is skipped. The ESLint output channel shows which case you are in.
Fix it fast
1Find out which cause you have
Open View, Output and choose ESLint in the dropdown, then open a file. The log says which ESLint it loaded and which config it found.
npx eslint --version ls eslint.config.* 2>/dev/null2Match what you see, then jump to its fix
- 1
ESLint is 8.57.x and the project has eslint.config.js.ESLint 8.57 with the extension still using eslintrcFix - 2
The VS Code workspace root has no eslint.config.js; the file sits in apps/web or similar.The config lives in a subfolder or monorepo packageFix - 3
Only TypeScript or only some file types show no errors.The file type is not in eslint.validateFix - 4
ESLint is 10 or later and settings.json still has eslint.useFlatConfig: false or an overrideConfigFile that points to .eslintrc.The project runs ESLint 10 and an old setting still points at a legacy fileFix
- 1
What does the error look like?
npx eslint . prints errors but the editor shows no squigglesThe ESLint output channel reports no config found, or the file is ignored
Cause 1 of 4
ESLint 8.57 with the extension still using eslintrc
1Check
The extension honors eslint.useFlatConfig from ESLint 8.57.0; on 8.57 up to 9.x exclusive it defaults to false. From 9.0.0 it defaults to true.
npx eslint --version2Fix
Turn the setting on, or upgrade ESLint to 9 or later.
// .vscode/settings.json
{
"eslint.useFlatConfig": true
}3Verify
Run ESLint: Restart ESLint Server from the command palette and re-open the file.
# Command palette: ESLint: Restart ESLint ServerConfirmed by raw.githubusercontent.com
Cause 2 of 4
The config lives in a subfolder or monorepo package
1Check
eslint.workingDirectories controls the directory ESLint uses to resolve config and ignore files. The default is the workspace folder or file location. The auto mode infers it from package.json and config files.
find . -name "eslint.config.*" -not -path "*/node_modules/*"2Fix
Point the extension at the folder, or use auto mode.
// .vscode/settings.json
{
"eslint.workingDirectories": [{ "mode": "auto" }]
}3Verify
Restart the ESLint server and open a file from the subfolder.
# Command palette: ESLint: Restart ESLint ServerConfirmed by raw.githubusercontent.com
Cause 3 of 4
The file type is not in eslint.validate
1Check
When eslint.validate is set, only the language ids in it are validated. A leftover array from the eslintrc days can exclude typescriptreact or another id.
grep -n "eslint" .vscode/settings.json2Fix
Add the missing language ids, or remove the setting so the defaults apply.
// .vscode/settings.json
{
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"]
}3Verify
Restart the ESLint server; open a .tsx file with a known violation.
# Command palette: ESLint: Restart ESLint ServerConfirmed by raw.githubusercontent.com
Cause 4 of 4
The project runs ESLint 10 and an old setting still points at a legacy file
1Check
From ESLint 10 the useFlatConfig setting is ignored because flat config cannot be turned off, and ESLint searches from each file's directory upward for eslint.config.*.
grep -n "useFlatConfig\|overrideConfigFile" .vscode/settings.json2Fix
Remove the legacy settings and let the extension find eslint.config.js (supported extensions include .js, .mjs, .cjs, .ts, .mts).
// .vscode/settings.json: delete these keys
// "eslint.useFlatConfig": false,
// "eslint.options": { "overrideConfigFile": ".eslintrc.json" }3Verify
Restart the ESLint server and watch the Output channel.
# Command palette: ESLint: Restart ESLint ServerConfirmed by raw.githubusercontent.com
How do I stop it coming back?
- Commit .vscode/settings.json with the ESLint settings so the whole team has the same behaviour.
- After changing config or settings, always run ESLint: Restart ESLint Server.
- For remote setups (WSL, Remote SSH, Dev Containers) set the options in the remote settings and reload the window.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Related fixes
Web apps
ESLint no longer reads .eslintrc after upgrading to v9 or v10
Linting stops because no eslint.config file exists in the project
Yes.
4 causes, each with a fixWeb apps
tsconfig rejects allowImportingTsExtensions
An error that allowImportingTsExtensions needs noEmit or emitDeclarationOnly
allowImportingTsExtensions lets files import each other with .ts or .tsx extensions, and TypeScript only allows it together with noEmit or emitDeclarationOnly.
2 causes, each with a fixWeb apps
AuthUserPoolException: Auth UserPool not configured in a Next.js app
Auth UserPool not configured
The error means an Amplify Auth call ran before Amplify.configure did.
3 causes, each with a fixWeb apps
Module not found for antd/dist/antd.less after upgrading to Ant Design 5
Module not found: Error: Can't resolve 'antd/dist/antd.less'
Ant Design 5 dropped Less and the bundled CSS file for CSS-in-JS, so antd/dist/antd.less no longer exists.
3 causes, each with a fixWeb apps
Apollo Server rejects a request as a potential CSRF
HTTP 400 Bad Request from the GraphQL endpoint
Apollo Server's CSRF prevention is on by default.
3 causes, each with a fixWeb apps
Apollo Client is blocked by CORS when the GraphQL server runs on AWS Lambda
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Apollo Server does not set CORS for you when it runs behind a framework or integration, and on Lambda that layer is API Gateway.
5 causes, each with a fix