问题描述
我已经在 VSCode 中安装了 TSLint,并在 tsconfig.json
旁边创建了一个 tslint.json
文件.但是 TSLint 不起作用.例如,我在 tslint.json
中添加了 "curly": true
,但是当我编写没有花括号的 if 语句时,VS Code 不会给出任何警告.这个扩展有什么作用?
I have installed TSLint in VSCode and created a tslint.json
file next to tsconfig.json
. But TSLint is not working. For example, I added "curly": true
to tslint.json
, but when I write a if statement without curly braces, VS Code doesn't give any warning. What does this extension do?
推荐答案
当遇到无效的配置选项时,vscode-tslint 扩展当前会静默崩溃.就我而言,必须将 no-trailing-comma
规则更改为 trailing-comma
.
The vscode-tslint extension currently crashes silently when it encounters an invalid config-option. In my case, it was the no-trailing-comma
rule which has to be changed to trailing-comma
.
更多信息在这里:https://github.com/Microsoft/vscode-tslint/问题/66
这篇关于如何在 VS Code 中使用 TSLint?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!