TSLint.json配置文件(https://github.com/palantir/tslint)支持extends
和像这样的rulesDirectory
数组
{
"extends": [
"tslint-microsoft-contrib",
"tslint-config-security"
],
"rulesDirectory": [
"node_modules/tslint-eslint-rules/dist/rules",
"node_modules/tslint-microsoft-contrib",
"node_modules/tslint-config-security"
]
}
对于不熟悉该工具的新用户,文档似乎有些开放的解释。
[如果有人能澄清extends
和rulesDirectory
与VS Code编辑器中使用的行为以及一般tslint
的使用有关的几点,我将不胜感激。
extends
only是否提供默认配置(如果由软件包提供)?
因此,这与rulesDirectory
不同吗?
rulesDirectory
仅为您提供专门选择加入的规则(如果在根tslint.json中指定规则,则是必需的吗?
我仍应同时在两个tslint
中指定extends
软件包吗?[[和
rulesDirectory
?extends
提供了另一个tslint
配置文件的默认设置,我是否能够指定rulesDirectory
并添加规则以覆盖特定标志?担心,因为只有某些规则会显示在IntelliSense自动补全中,而只有一些行为,我希望您能更清楚地了解。
TSLint.json配置文件(https://github.com/palantir/tslint)支持扩展和rulesDirectory数组,例如{“ extends”:[ 。