-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed as not planned
Labels
bugSomething isn't workingSomething isn't workingfix: flat config user errorLike "fix: user error" - but specifically for flat config user errorsLike "fix: user error" - but specifically for flat config user errorsfix: user errorissue was fixed by correcting the configuration / correcting the codeissue was fixed by correcting the configuration / correcting the codelocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: typescript-eslintIssues related to the typescript-eslint packageIssues related to the typescript-eslint packageworking as intendedIssues that are closed as they are working as intendedIssues that are closed as they are working as intended
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
It seems as if typescript-eslint would wrongly or not at all skip the files defined in the `ignores` property.
This might be related to #8511 but does not only happen when `extends` is used.ESLint Config
// @ts-check
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default tseslint.config({
ignores: [
'vendor/**/*',
],
languageOptions: {
ecmaVersion: 2021,
sourceType: 'module',
globals: {
...globals.es2021,
}
},
rules: {
'indent': ['warn', 'tab'],
'linebreak-style': ['warn', 'unix'],
'quotes': ['warn', 'single'],
'semi': ['warn', 'always'],
},
},
{
files: ['**/*.js'],
},
{
files: ['**/*.ts'],
plugins: {
'@typescript-eslint': tseslint.plugin,
},
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: true,
},
},
rules: {
'indent': 'off',
'@typescript-eslint/indent': ['warn', 'tab'],
'quotes': 'off',
'@typescript-eslint/quotes': ['warn', 'single'],
'semi': 'off',
'@typescript-eslint/semi': ['warn', 'always'],
},
});tsconfig
Expected Result
eslint should ignore the files in the vendor directory
Actual Result
eslint reports parse errors for files in the directory vendor:
0:0 error Parsing error: ESLint was configured to run on `<tsconfigRootDir>/vendor/file.d.ts` using `parserOptions.project`: tsconfig.json
However, that TSConfig does not include this file. Either:
- Change ESLint's list of included files to not include this file
- Change that TSConfig to include this file
- Create a new TSConfig that includes this file and include it in your parserOptions.project
See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-fileAdditional Info
No response
Versions
| package | version |
|---|---|
@typescript-eslint/eslint-plugin |
7.1.0 |
@typescript-eslint/parser |
7.1.0 |
TypeScript |
5.3.3 |
ESLint |
8.57.0 |
node |
20.11.0 |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfix: flat config user errorLike "fix: user error" - but specifically for flat config user errorsLike "fix: user error" - but specifically for flat config user errorsfix: user errorissue was fixed by correcting the configuration / correcting the codeissue was fixed by correcting the configuration / correcting the codelocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: typescript-eslintIssues related to the typescript-eslint packageIssues related to the typescript-eslint packageworking as intendedIssues that are closed as they are working as intendedIssues that are closed as they are working as intended
{ "compilerOptions": { "target": "es2021", "module": "commonjs", "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "strict": true, "skipLibCheck": true, "allowJs": true, "checkJs": true }, "include": ["src/**/*.ts"] }