-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuebugSomething isn't workingSomething isn't working
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.
Issue Description
I'm getting this error under eslint@9.12.0
, which did not occur under eslint@9.11.1
:
/wherever/vitest.config.ts
0:0 error Parsing error: /wherever/vitest.config.ts was not found by the project service.
Consider either including it in the tsconfig.json or including it in allowDefaultProject
The pertinent config is:
{
files: ['*.ts', '{src,db}/**/*.ts'],
extends: [...ts.configs.recommendedTypeChecked],
languageOptions: {
parserOptions: {
projectService: {
allowDefaultProject: ['vitest.config.ts'],
},
tsconfigRootDir: import.meta.dirname,
},
},
},
{
files: ['db/**/*.ts'],
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname + '/db',
},
},
},
The problem disappears if any of these are changed:
- eslint is downgraded to lower version
- the last block (with
files: ['db/**/*.ts']
) is removed - the first block is changed to not overlap with the second (i.e.,
files: ['*.ts', 'src/**/*.ts']
)
Reproduction Repository Link
https://github.com/LukeNotable/eslint-9.12.0-allow-default-project-bug
Repro Steps
- clone the repo
yarn install
yarn eslint .
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
8.9.0 |
@typescript-eslint/parser |
8.9.0 |
@typescript-eslint/scope-manager |
8.9.0 |
@typescript-eslint/typescript-estree |
8.9.0 |
@typescript-eslint/type-utils |
8.9.0 |
@typescript-eslint/utils |
8.9.0 |
TypeScript |
5.5.4 |
ESLint |
9.12.0 |
node |
22.9.0 |
gtbuchanan, Neogentai, Craig-Noguez14, fatima-ewn, davidotano123 and 2 more
Metadata
Metadata
Assignees
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuebugSomething isn't workingSomething isn't working