I have an angular 4 app and manually created 2 .spec files for a class. When I run nglint
, it will lint the 2 spec files. The spec files that were included when I generated a component with the angular-cli are not being linted however (which is what I want)
I have added the following property to my .angular-cli.json file, but it still lints the files:
"lint": [
{
"project": "src/tsconfig.app.json",
"exclude": "**/**/*.spec.ts"
},
{
"project": "src/tsconfig.spec.json",
"exclude": "**/**/*.spec.ts"
},
{
"project": "e2e/tsconfig.e2e.json",
"exclude": "**/**/*.spec.ts"
}
],
My spec files are located within /src/app/folder/
Tried now, once you add
"**/**/*.spec.ts"
toangular-cli.json - lint - exclude
, it will stop linting any.spec
file down from theapp
folder, no mater how deep you nest the folders.This is the
angular-cli.json
code I tested with: