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
🌐
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 ...
Discussions

visual studio code - How to configure the eslint extension in vscode? - Stack Overflow
I cannot figure out where to configure the eslint extension? Searching configure in the commands results in nothing. ... You can add extension-level configuration in the VSCode settings.json file. More on stackoverflow.com
🌐 stackoverflow.com
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
eslint - Set path for linter in setting.json [vscode] - Stack Overflow
To fix this I need to add something that specifies the path to the linting file in the project I was told but not shown how to do that. ... You need to specify in settings.json where the eslint.json file is. The code is ... This got my linter working in vscode again, hope this helps someone ... More on stackoverflow.com
🌐 stackoverflow.com
visual studio code - Configuring ESLint with VSCode - Stack Overflow
I have the following directory structure: / ├──.node-modules ├──server # server code │ ├──... ├──shared # modules used by client and server ├──webapp # client... More on stackoverflow.com
🌐 stackoverflow.com
🌐
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.
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
ESLint - Visual Studio Marketplace
Visual Studio Code>Programming Languages>ESLintNew to Visual Studio Code?
🌐
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
4 days ago - 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.
Find elsewhere
🌐
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
🌐
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 } ]
🌐
GitHub
github.com › microsoft › vscode-eslint
GitHub - microsoft/vscode-eslint: VSCode extension to integrate eslint into VSCode · GitHub
For ESLint v9 and later (or v8.57+ with flat config), this should be one of: ... Read more about ESLint CLI. For projects using older ESLint versions (< 8.57), use a legacy .eslintrc file (.eslintrc.json, .eslintrc.js, etc.).
Starred by 1.9K users
Forked by 370 users
Languages   TypeScript 62.7% | Jupyter Notebook 31.1% | JavaScript 5.8%
🌐
Reddit
reddit.com › r/vscode › use custom path for eslintrc file.
r/vscode on Reddit: use custom path for eslintrc file.
December 22, 2022 - I recently setup eslint with husky in vscode. Due to the structure of my project the. .eslintrc file is inside a folder with name client. Now when I…
🌐
DEV Community
dev.to › devdammak › setting-up-eslint-in-your-javascript-project-with-vs-code-2amf
Eslint Vscode: Setting up ESLINT in your JavaScript Project with VS Code - DEV Community
March 4, 2019 - Thanks was really helpful, been trying to configure eslint to work without success until i read your article, i added lint as a script exactly as in your tutorial but it didn't work, i did "lint": "eslint myfile.js" instead and it worked. thanks a lot. ... I'm glad the article was able to help.... Using "lint: eslint myfile.js" will only lint a single file which is myfile.js.
🌐
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 - /client /.vscode settings.json /src main.ts App.svelte eslint.config.js package.json vite.config.ts package.json pnpm-workspace.yaml
Author   eakl
🌐
Medium
medium.com › wearelaika › javascript-eslint-global-configuration-setup-vscode-599cbfc81eb5
JavaScript: ESLint Global Configuration Setup (VSCode) | by Ivan Stevkovski | wearelaika | Medium
January 30, 2020 - Once you’ve completed your configuration, scroll to the bottom of the “Rules Configuration” tab and press the “Download .eslintrc.json file with this configuration” link.
🌐
GitHub
github.com › microsoft › vscode-eslint › issues › 1932
Question: does this extension supports `.config` folder? · Issue #1932 · microsoft/vscode-eslint
September 19, 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
🌐
DeepWiki
deepwiki.com › microsoft › vscode-eslint › 5-configuration
Configuration | microsoft/vscode-eslint | DeepWiki
November 25, 2025 - ESLint resolves configuration files (.eslintrc, .eslintignore) relative to a working directory.