[英]tslint.json is not working in VS Code
So, I have my tsconfig.json and tslint.json at the root of my project. 因此,我在项目的根目录下有tsconfig.json和tslint.json。 When I run
tslint
, it displays all of the errors in Terminal. 当我运行
tslint
,它将在Terminal中显示所有错误。 But I do not get any hints/lines in VS Code. 但是我在VS Code中没有得到任何提示/提示。 I'm driving myself crazy trying to figure out why it won't work.
我让自己发疯,试图弄清楚为什么它不起作用。 I deliberately went against a rule but nothing happens.
我故意违反规则,但没有任何反应。 I've tried force-quitting several times.
我已经尝试过几次强制退出。 I've tried other rules and going against them.
我尝试了其他规则并违背它们。 (Note, I am not talking about the VSCode extension for TSLint.) I wrote a pretty basic one:
(请注意,我并不是在谈论TSLint的VSCode扩展。)我写了一个非常基本的代码:
{
"defaultSeverity": "error",
"extends": [
"tslint:recommended"
],
"jsRules": {},
"rules": {
"quotemark": [
true,
"single",
"avoid-escape"
],
"semicolon": [
true,
"always"
]
},
"rulesDirectory": []
}
If you have not installed tslint extension and do not run tslint via task manually - VSCode will not "check" its rules. 如果您尚未安装tslint扩展,并且不通过任务手动运行tslint,则VSCode将不会“检查”其规则。
VSCode has no "embedded" support of the tslint. VSCode没有对tslint的“嵌入式”支持。 You must install the aforementioned extension in order to get intellisense support you are looking after.
您必须安装上述扩展才能获得所需的智能支持。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.