当我添加规则时,
"@typescript-eslint/interface-name-prefix": [ "error", { "prefixWithI": "always" }]
给出以下错误信息:未找到规则“@typescript-eslint/interface-name-prefix”的定义。eslint(@typescript-eslint/interface-name-prefix)
最佳答案
规则@typescript-eslint/interface-name-prefix
如您所见,已被删除 here .
可以达到与[ "error", { "prefixWithI": "always" }]
相同的效果具有以下内容:
{
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "interface",
"format": ["PascalCase"],
"custom": {
"regex": "^I[A-Z]",
"match": true
}
}
]
}
关于node.js - 添加规则时 Eslint 错误 @typescript-eslint/interface-name-prefix,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62915344/