I want to set up SonarTS inside of my Angular 6 project, but when running my lint npm script I get code analysis of my .spec files too. Sometimes duplication in my .spec files is desirable, so how can I deactivate this, without skipping linting for my .spec files?
npm script in package.json
"lint": "tslint -p src/tsconfig.tslint.json -t stylish -c tslint.json",
devDependency in package.json
"tslint-sonarts": "^1.7.0",
tslint.json
"extends": [
"@ns/tslint-presets/tslint.recommended.angular.json",
"tslint-config-prettier",
"tslint-sonarts"
],
tsconfig.json (this also skips linting, not desired!)
"exclude": [
"node_modules",
"**/*.spec.ts"
],