Error "parserOptions.project has been set for @typescript-eslint/parser" — ¿cómo solucionarlo?
¡Hola! Soy nuevo en TypeScript y estoy intentando configurar ESLint en mi proyecto. Uso @typescript-eslint/parser y @typescript-eslint/eslint-plugin. Pero al ejecutar ESLint obtengo un error extraño:
```
Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: src/index.ts.
The file must be included in at least one of the projects provided.
```
Aquí está mi .eslintrc.json:
```json
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
]
}
```
Y tsconfig.json:
```json
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"strict": true,
"esModuleInterop": true,
"outDir": "./dist"
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
}
```
El archivo src/index.ts existe y contiene