1
我想將tslint添加到我的工作流程中。我通過安裝了它:如何在使用tslint時忽略* .d.ts文件?
npm install tslint tslint-config-ms-recommended --save-dev
而且我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
http://stackoverflow.com/questions/34578677/how-to-ignore-a-particular-directory-or-file-for-tslint – k0pernikus