I have a TypeScript project, which is bundling by Webpack. And now I want to add some Eslint. But there's one problem - Eslint watch compiled files even if they in the .eslintignore
.eslintignore:
./app
As you see, Eslint tried to look inside app directory, but there was an error, because I exlude this directory in the tsconfig.json
{
"compilerOptions": {
"module": "es2020",
"target": "es6",
"jsx": "react",
"allowJs": true,
"sourceMap": true,
"moduleResolution": "node",
"experimentalDecorators": true
},
"include": ["./**/*"],
"exclude": [
"node_modules/**/*",
"app/**/*"
]
}
Eslint do not watch node_modules , but they are not in .eslintignore . But it watch app directory, which is in .eslintignore . How can I fix it?
EDIT:
This is the structure of my code:
It looks like we don't need the dot .
in front of app
based on the document I think we just need to leave it as app
:
.eslintignore
:
app
// or blob pattern
app/**/*.js
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.