From Angular6+, .angular-cli.json
has been replaced by angular.json
, but you can still add the exclude path in its lint
part.
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**" // excluded directories
]
}
}
According to the angular-cli issue#5063, you can add the exclude path in .angular-cli.json
like this:
"lint": [
{
"project": "src/tsconfig.app.json",
"exclude": "**/node_modules/**/*" // the node_modules for example
}]
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…