Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
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 havesearched for related issues and found none that matched my issue.
- I haveread the FAQ and my problem is not listed.
Relevant Package
parser
Playground Link
No response
Repro Code
N/A.Thisissue isaboutaconfusingconfigurationbehavior.
ESLint Config
// base-config.jsmodule.exports={plugins:["@typescript-eslint"],parser:"@typescript-eslint/parser",parserOptions:{projectService:true}}// .eslintrc.jsmodule.exports={extends:"./base-config.js",parserOptions:{project:"./tsconfig.eslint.json"}}
tsconfig
{"compilerOptions": {// ... }}
Expected Result
The docs aren't clear of what the parser will use when bothprojectService
andproject
are set. This can be particularly confusing when extending a configuration that setsparserOptions
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 |