仅针对SonarTS而非.TSLint跳过.spec文件

时间:2018-09-07 07:56:46

标签: angular tslint sonarlint

我想在Angular 6项目中设置SonarTS,但是在运行lint npm脚本时,我也会对.spec文件进行代码分析。有时需要在.spec文件中进行复制,所以如何在不跳过.spec文件的情况下将其停用?

package.json

中的

npm脚本

"lint": "tslint -p src/tsconfig.tslint.json -t stylish -c tslint.json",
package.json

中的

devDependency

"tslint-sonarts": "^1.7.0",

tslint.json

"extends": [
    "@ns/tslint-presets/tslint.recommended.angular.json",
    "tslint-config-prettier",
    "tslint-sonarts"
],

tsconfig.json (这也会跳过掉毛,这是不希望的!)

"exclude": [
    "node_modules",
    "**/*.spec.ts"
],

0 个答案:

没有答案
相关问题