The solution is to define an overrideConfigFile option to point to the location of the ESLint configuration file in the workspace in the settings.json like so:

{
    "eslint.options": { "overrideConfigFile": "./path/to/eslint.config.js" }
}

Since ESLint v8.x, the ESLint extension in VSCode uses the ESLint Class API to "[...] configure how ESLint is started". The extension documents that "[...] to point to a custom .eslintrc.json file using the new ESLint API" is as shown above.

For good measure, since the configuration file used is the new flat config file, the eslint.useFlatConfig setting can also be explicitly set to true. In the settings.json:

{
    "eslint.useFlatConfig": true
}

Since version 3.0.5 of the extension, the activation of this setting works like this:

  • 8.57.0 <= ESLint version < 9.x: setting is honored and defaults to false.
  • 9.0.0 <= ESLint version < 10.x: settings is honored and defaults to true.
Answer from amoralesc on Stack Overflow
🌐
Next.js
nextjs.org › docs › app › api-reference › config › eslint
Configuration: ESLint | Next.js
2 weeks ago - "packages/*/"), or an array of paths and/or globs. If you would like to modify or disable any rules provided by the supported plugins (react, react-hooks, next), you can directly change them using the rules property in your eslint.config.mjs:
Discussions

Question: does this extension supports `.config` folder?
I currently have a eslint.config.mjs file in the root of a project. In order to organize all config files, I was thinking about moving them to a .config folder, inside the project. Does vscode-esli... More on github.com
🌐 github.com
10
August 16, 2024
Use file location for `.eslintrc.js` resolution
It seems that when using multiple .eslintrc.js files throughout the workspace (of which some may use root: true), vscode-eslint doesn't follow the same resolution algorithm that eslint itself u... More on github.com
🌐 github.com
12
July 11, 2019
🌐
Visual Studio Code
code.visualstudio.com › docs › debugtest › tasks
Integrate with External Tools via Tasks
November 3, 2021 - JSHint Stylish: $jshint-stylish assumes that file names are reported as an absolute path. ESLint Compact: $eslint-compact assumes that file names in the output are relative to the opened folder.
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
ESLint - Visual Studio Marketplace
Visual Studio Code>Programming Languages>ESLintNew to Visual Studio Code?
🌐
ESLint
eslint.org › docs › latest › use › getting-started
Getting Started with ESLint
After that, you can run ESLint on any file or directory like this: ... Note: If you are coming from a version before 9.0.0 please see the migration guide. When you run npm init @eslint/config, you’ll be asked a series of questions to determine how you’re using ESLint and what options should be included.
🌐
Medium
medium.com › @jeryldev › a-beginners-story-how-to-setup-eslint-in-a-visual-studio-code-project-28b379a33cdb
How to set up ESLint in a Visual Studio Code project — my 5 minute story | by Jeryl Donato Estopace | Medium
December 31, 2018 - After searching for answers over the web, I found out that I need to execute ‘eslint --init’ in the node_modules/eslint sub folder that contains a package.json file. Back in my Command Prompt, I navigated to node_modules\eslint sub folder ...
Find elsewhere
🌐
ESLint
eslint.org › docs › latest › use › configure › migration-guide
Configuration Migration Guide
You can see the TypeScript types for the flat config file format in the lib/types source folder on GitHub. The interface for the objects in the config’s array is called Linter.Config. You can view the type definitions in lib/types/index.d.ts. ESLint v9.x support was added in the vscode-eslint v3.0.10.
🌐
Kintone
kintone.dev › en › tutorials › tool-guides › eslint
Improve Code Quality with ESLint - Kintone Developer Program
It is convenient to place the file in the folder C:\\Users\\_username_ etc. to execute ESLint with the same settings from any folder. Follow these steps to install ESLint and @cybozu/eslint-config on Mac.
🌐
Dave Ceddia
daveceddia.com › vscode-use-eslintrc
ESLint + VSCode: How to Format Your Code Using .eslintrc
... Install the top result, called “ESLint”. (It’s this one with over 10 million downloads) 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.
🌐
Prettier
prettier.io › docs › install
Install · Prettier
If your editor does not support Prettier, you can instead run Prettier with a file watcher. ... Don’t skip the regular local install! Editor plugins will pick up your local version of Prettier, making sure you use the correct version in every project. (You wouldn’t want your editor accidentally causing lots of changes because it’s using a newer version of Prettier than your project!) And being able to run Prettier from the command line is still a good fallback, and needed for CI setups. If you use ESLint, install eslint-config-prettier to make ESLint and Prettier play nice with each other.
🌐
GitHub
github.com › microsoft › vscode-eslint › issues › 1932
Question: does this extension supports `.config` folder? · Issue #1932 · microsoft/vscode-eslint
August 16, 2024 - I currently have a eslint.config.mjs file in the root of a project. In order to organize all config files, I was thinking about moving them to a .config folder, inside the project. Does vscode-esli...
Author   gian1200
🌐
Visual Studio Code
code.visualstudio.com › docs › devcontainers › containers
Developing inside a Container
November 3, 2021 - If a base image or Feature configures an extension that you do not want installed in your dev container, you can opt out by listing the extension with a minus sign. For example: { "image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bookworm", "customizations": { "vscode": { "extensions": ["-dbaeumer.vscode-eslint"] } } }
🌐
GitHub
github.com › microsoft › vscode-eslint › issues › 712
Use file location for `.eslintrc.js` resolution · Issue #712 · microsoft/vscode-eslint
July 11, 2019 - It seems that eslint.workingDirectories could be a (very inelegant and manual) solution to this problem, by specifying every directory, that has an .eslintrc.js file as a working directory. Is there no way for vscode-eslint to "just" follow the same resolution logic that eslint uses?
Author   buschtoens
🌐
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 --save-dev flag ensures that eslint will be listed in your package.json file as a development dependency only. Now that ESLint is installed, you can initialize an ESLint configuration for your project using the following command: ... An important piece in this command is the --init flag. The ./node_modules/.bin/eslint section of the command is the path to ESLint in your project.
🌐
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 - Use ls -a to show hidden files in your terminal. Additionally, you can stop ESLint from searching further up the directory tree by adding the root option to the .eslintrc in your project root directory: ... Learn more about Configuration Cascading and Hierarchy in the official documentation. Maybe you've just set up a new VSCode installation or something's gone wrong syncing your settings.
🌐
Microsoft Learn
learn.microsoft.com › en-us › visualstudio › javascript › linting-javascript
Linting JavaScript in Visual Studio - Visual Studio (Windows) | Microsoft Learn
May 5, 2025 - Starting in Visual Studio 2022 ... ESLint is installed globally, where you might set the corresponding path to C:\Program Files\nodejs\node_modules....
🌐
MegaLinter
megalinter.io › 8.4.2 › descriptors › jsx_eslint
eslint configuration in MegaLinter - MegaLinter by OX Security
Deprecated: use --cache-location - default: .eslintcache --cache-location path::String Path to the cache file or directory --cache-strategy String Strategy to use for detecting changed files in the cache - either: metadata or content - default: metadata Miscellaneous: --init Run config initialization wizard - default: false --env-info Output execution environment information - default: false --no-error-on-unmatched-pattern Prevent errors when pattern is unmatched --exit-on-fatal-error Exit with exit code 2 in case of fatal error - default: false --debug Output debugging information -h, --help Show help -v, --version Output the version number --print-config path::String Print the configuration for the given file
🌐
Codalas
codalas.com › en › 2311 › configuring-vscode-for-subfolder-projects-to-ensure-correct-eslint-operation
Configuring VSCode ESLint for Subfolder Projects in Monorepos | VSCode Tutorial
Adjusting ESLint Configuration: If you need to work with the entire codebase and have ESLint focus on a subfolder, you can modify the ESLint settings within VSCode. Open the Command Palette with Ctrl+Shift+P or Cmd+Shift+P. Type Preferences: Open Settings (JSON) and select it. Add or modify the eslint.workingDirectories setting to include your subfolder, like so: ... "eslint.workingDirectories": [ { "directory": "./path/to/your/subfolder", "changeProcessCWD": true } ]