Closed
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
types
ESLint Config
import tseslint from 'typescript-eslint';
// v8 alpha
export default tseslint.config(
{
languageOptions: {
parserOptions: {
projectService: {
allowDefaultProject: ['./*.js'],
defaultProject: './tsconfig.json',
},
},
},
},
);
// v7
export default tseslint.config(
{
languageOptions: {
parserOptions: {
EXPERIMENTAL_useProjectService: {
allowDefaultProject: ['./*.js'],
defaultProject: './tsconfig.json',
},
},
},
},
);
tsconfig
Expected Result
Config should not have a type error.
Actual Result
On line 7, there is an error.
On v8 alpha:
Type '{ allowDefaultProject: string[]; defaultProject: string; }' is not assignable to type 'boolean'.ts(2322)
parser-options.d.ts(30, 5): The expected type comes from property 'projectService' which is declared here on type 'ParserOptions'
On v7:
Type '{ allowDefaultProject: string[]; defaultProject: string; }' is not assignable to type 'boolean'.ts(2322)
parser-options.d.ts(25, 5): The expected type comes from property 'EXPERIMENTAL_useProjectService' which is declared here on type 'ParserOptions'
Additional Info
Config is adapted from https://typescript-eslint.io/blog/announcing-typescript-eslint-v8-beta/#project-service.
At a glance, it seems like there is a type mismatch between
Versions
v8 alpha
package | version |
---|---|
@typescript-eslint/types |
8.0.0-alpha.29 |
@typescript-eslint/parser |
8.0.0-alpha.29 |
typescript-eslint |
8.0.0-alpha.29 |
v7
package | version |
---|---|
@typescript-eslint/types |
7.12.0 |
@typescript-eslint/parser |
7.12.0 |
typescript-eslint |
7.12.0 |