Wil*_*ior 23 node.js typescript eslint
当我添加规则时,
"@typescript-eslint/interface-name-prefix": [ "error", { "prefixWithI": "always" }]
Run Code Online (Sandbox Code Playgroud)
给出以下错误信息:
未找到规则“@typescript-eslint/interface-name-prefix”的定义。eslint(@typescript-eslint/interface-name-prefix)
Tel*_*per 63
@typescript-eslint/interface-name-prefix正如您在此处看到的,该规则已被删除。
您可以[ "error", { "prefixWithI": "always" }]通过以下方式实现相同的效果:
{
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "interface",
"format": ["PascalCase"],
"custom": {
"regex": "^I[A-Z]",
"match": true
}
}
]
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11159 次 |
| 最近记录: |