我想将 tslint 添加到我的工作流程中。我通过以下方式安装它:
npm install tslint tslint-config-ms-recommended --save-dev
And my tslint.json
好像:
{
"extends": "tslint-config-ms-recommended"
}
然而当我跑步时:
./node_modules/.bin/tslint src/**/*.ts
它还检查许多明确键入的文件,例如:
src/interfaces/highland.d.ts[621, 1]: space indentation expected
src/interfaces/highland.d.ts[622, 1]: space indentation expected
src/interfaces/highland.d.ts[635, 1]: space indentation expected
污染输出。
我只想检查我的*.ts
文件,并且正在寻找一种忽略其他类型的方法。
我看到有一个--exclude
选项,但当我运行时它仍然显示 d.ts 文件:
./node_modules/.bin/tslint src/**/*.ts --exclude src/**/*.d.ts
排除选项需要一个=
, hence:
tslint src/**/*.ts --exclude=src/**/*.d.ts
或将忽略部分括在引号中:
tslint src/**/*.ts --exclude "src/**/*.d.ts"
将按预期工作。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)