[英]Eslint erro when adding rule @typescript-eslint/interface-name-prefix
When I add the rule,当我添加规则时,
"@typescript-eslint/interface-name-prefix": [ "error", { "prefixWithI": "always" }]
give the following error message:给出以下错误信息:
Definition for rule '@typescript-eslint/interface-name-prefix' was not found.eslint(@typescript-eslint/interface-name-prefix)找不到规则“@typescript-eslint/interface-name-prefix”的定义。eslint(@typescript-eslint/interface-name-prefix)
The rule @typescript-eslint/interface-name-prefix
has been removed as you can see here .如您在此处看到的,规则
@typescript-eslint/interface-name-prefix
已被删除。
You can achieve the same effect of [ "error", { "prefixWithI": "always" }]
with the following:您可以使用以下内容实现与
[ "error", { "prefixWithI": "always" }]
相同的效果:
{
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "interface",
"format": ["PascalCase"],
"custom": {
"regex": "^I[A-Z]",
"match": true
}
}
]
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.