gpt4 book ai didi

tslint - TSLint 中省略规则的默认值是多少?

转载 作者:行者123 更新时间:2023-12-01 04:48:53 27 4
gpt4 key购买 nike

我查看了文档,但无法弄清楚 TSLint 中规则的默认值是什么。如果我没有指定此处找到的规则之一( https://palantir.github.io/tslint/rules/ ),那么它是否默认为 false?

最佳答案

根据Configuring TSLint page :

Rule severity

The severity level of each rule can be configured to default, error, warning/warn, or off/none. If no severity level is specified, default is used. The defaultSeverity top-level option replaces the severity level for each rule that uses severity level default in the current file. Valid values for defaultSeverity include error, warning/warn, and off/none.





defaultSeverity?: "error" | "warning" | "off": The severity level that is applied to rules in this config file as well as rules in any inherited config files which have their severity set to “default”. If undefined, “error” is used as the defaultSeverity.



回答您的问题:省略规则的默认值是值 defaultSeverity如果 defaultSeverity未设置默认值为 error .

另请注意,如果您有:
"extends": "tslint:recommended"

在您的 tslint.json 中,您继承了 recommended.js 中设置的所有值.

关于tslint - TSLint 中省略规则的默认值是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43682069/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com