【发布时间】:2019-11-02 15:26:01
【问题描述】:
我想像所有酷孩子一样,所以我非常想使用打字稿。除了不输入不必要的分号之外,有没有办法抑制不必要的分号警告?我不想让 tslint 抱怨分号。
我的 tslint.json:
{
"defaultSeverity": "warning",
"extends": [
"tslint:recommended"
],
"linterOptions": {
"exclude": [
"node_modules/**",
"src/plugins/**"
]
},
"rules": {
"quotemark": [true, "single"],
"indent": [true, "spaces", 2],
"interface-name": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"no-consecutive-blank-lines": false,
"member-access": [true, "no-public"],
"semicolon": [true, "never"],
"trailing-comma": "ignore",
"no-console": false
}
}
【问题讨论】:
-
如果你不想让它抱怨,为什么要把它设置为
true? -
@jhpratt 不管它的设置是什么,仍然抱怨
-
我试图在我的机器上解决这个问题 - 使用最新的 TS 和 tslint,似乎 no 规则根本起作用 .
-
@jhpratt 是的,我尝试将其设置为所有可用选项,结果相同,非常烦人
标签: tslint