![](/img/trans.png)
[英]How can I use a custom tslint rule written in TypeScript with vscode-tslint without compiling to JS?
[英]Should I use the built in linter in Typescript >2 or TSLint?
我試圖決定為什么我應該在我的Typescript2
/ Angular2
項目中使用TSLint
。
TSLint
公開的規則列表: https : TSLint
使用TypeScript
提供的編譯器選項: https : //www.typescriptlang.org/docs/handbook/compiler-options.html
由於Typescript2
現在有一些編譯器選項,如--noUnusedParameters
,是否真的需要TSLint
? TSLint
是編譯器選項的超集嗎?
項目結構:
.
├── bower.json
├── index.js
├── package.json
├── src
│ ├── app
│ │ ├── app.component.spec.ts
│ │ ├── app.component.ts
│ │ └── app.module.ts
│ ├── index.html
│ ├── main.ts
│ └── tsconfig.json
├── tslint.js
├── webpack.common.js
└── webpack.dev.config.js
當TSLint正確添加到TypeScript時,它會刪除規則。 但是,仍有很多規則,TypeScript不會檢查,所以如果你關心它,你可能想要同時使用它們。
我很高興使用TSLint for Typescript Library Starter結合TSLint配置標准 ,它不僅為您提供了更廣泛的規則,而且還旨在實現標准化。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.