Closed as not planned
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
typescript-eslint
Playground Link
No response
Repro Code
overrides: [
{
files: ["*.js", "*.jsx"],
parser: "@babel/eslint-parser",
parserOptions: {
project: "./jsconfig.json",
},
},
]
ESLint Config
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
},
overrides: [
{
files: ["*.js", "*.jsx"],
parser: "@babel/eslint-parser",
parserOptions: {
project: "./jsconfig.json",
},
},
]
};
tsconfig
Expected Result
I expected to be able to run lint successfully.
Actual Result
I was not able to run lint. I got this error message:
Error: Error while loading rule '@typescript-eslint/consistent-type-imports': You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.
Parser: [path-to-project]/node_modules/@babel/eslint-parser/lib/index.cjs
Note: detected a parser other than @typescript-eslint/parser. Make sure the parser is configured to forward "parserOptions.project" to @typescript-eslint/parser.
Occurred while linting [path-to-project]/.eslintrc.js
Additional Info
I have configured eslint to use different parser for js and ts files. This causes issue with version 7.4.0 of @typescript-eslint/parser.
Note that everything works fine with version 7.3.1.
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
7.4.0 |
@typescript-eslint/parser |
7.4.0 |
TypeScript |
5.4.3 |
ESLint |
8.57.0 |