Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
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
typescript-estree
Playground Link
No response
Repro Code
The logic ingetProjectConfigFiles
compares the length ofparseSettings.filePath
(dirname) andparseSettings.tsconfigRootDir
to stop looking for the config.
But whentsconfigRootDir
is not set in the.eslintrc.js
config, they can be totally different paths, for example, depending where VSCode was installed (value used fortsconfigRootDir
) for tooling.
Then, it is correct to stop looking for config "only" if theparseSettings.filePath
starts withtsconfigRootDir
, otherwise just keep looking up to the root.
typescript-eslint/packages/typescript-estree/src/parseSettings/getProjectConfigFiles.ts
Line 53 ina4b633b
directory.length>=parseSettings.tsconfigRootDir.length |
ESLint Config
module.exports={parser:"@typescript-eslint/parser",rules:{"@typescript-eslint/<rule-name>":["error", ...<options>],},parserOptions:{project:true}};
tsconfig
{"compilerOptions": {// ... }}
Expected Result
The config file should be found.
Actual Result
The config file is not found because it stops prematurely.
Additional Info
No response
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin | 5.58.0 |
@typescript-eslint/parser | 5.58.0 |
@typescript-eslint/scope-manager | 5.58.0 |
@typescript-eslint/typescript-estree | 5.58.0 |
@typescript-eslint/type-utils | 5.58.0 |
@typescript-eslint/utils | 5.58.0 |
TypeScript | 5.0.4 |
ESLint | 8.38.0 |
node | 18.14.1 |