I am currently working on a TypeScript project that is bundled by Webpack. I want to integrate Eslint into the project, but I have encountered an issue where Eslint watches compiled files even if they are listed in the .eslintignore file.
.eslintignore:
./app
https://i.sstatic.net/SajT0.png
Despite excluding the app directory in the tsconfig.json, Eslint still tries to access it, leading to errors.
{
"compilerOptions": {
"module": "es2020",
"target": "es6",
"jsx": "react",
"allowJs": true,
"sourceMap": true,
"moduleResolution": "node",
"experimentalDecorators": true
},
"include": ["./**/*"],
"exclude": [
"node_modules/**/*",
"app/**/*"
]
}
Interestingly, Eslint does not watch the node_modules directory, which is not included in the .eslintignore file. However, it continues to watch the app directory despite being excluded in the same file. How can I resolve this issue?
EDIT:
This image shows the structure of my code: