Open
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Relevant Package
parser
Playground Link
No response
Repro Code
N/A. This issue is about a confusing configuration behavior.
ESLint Config
// base-config.js
module.exports = {
plugins: [ "@typescript-eslint" ],
parser: "@typescript-eslint/parser",
parserOptions: { projectService: true }
}
// .eslintrc.js
module.exports = {
extends: "./base-config.js",
parserOptions: { project: "./tsconfig.eslint.json" }
}
tsconfig
Expected Result
The docs aren't clear of what the parser will use when both projectService
and project
are set. This can be particularly confusing when extending a configuration that sets parserOptions
which are later combined into a single merged object. I would expect for the parser to throw an explicit error in such misconfiguration scenarios, or have a well-documented explanation of what happens when both settings are provided.
Actual Result
eslint --print-config
shows that the merged configuration has { project: "./tsconfig.eslint.json", projectService: true }
, and it's not clear how the TypeScript program will be discovered.
Additional Info
No response
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
^8.31.0 |
@typescript-eslint/parser |
^8.31.0 |
TypeScript |
5.8.3 |
ESLint |
^8.57.0 |
node |
22.14.0 |