Node.js 添加规则@typescript Eslint/接口名称前缀时出现Eslint错误
当我添加规则时Node.js 添加规则@typescript Eslint/接口名称前缀时出现Eslint错误,node.js,typescript,eslint,Node.js,Typescript,Eslint,当我添加规则时 "@typescript-eslint/interface-name-prefix": [ "error", { "prefixWithI": "always" }] 给出以下错误消息: 未找到规则“@typescript eslint/接口名称前缀”的定义。eslint(@typescript eslint/接口名称前缀)如您所见,已删除规则@typescript eslint/接口名称前缀 您可
"@typescript-eslint/interface-name-prefix": [ "error", { "prefixWithI": "always" }]
给出以下错误消息:
未找到规则“@typescript eslint/接口名称前缀”的定义。eslint(@typescript eslint/接口名称前缀)如您所见,已删除规则
@typescript eslint/接口名称前缀
您可以通过以下操作实现与[“error”、{“prefixWithI”:“always”}]
相同的效果:
{
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "interface",
"format": ["PascalCase"],
"custom": {
"regex": "^I[A-Z]",
"match": true
}
}
]
}
我刚刚更新了我的库,得到了相同的错误——感谢您的回答:)在我使用命令(纱线升级交互——最新)更新包之后,出现了错误,非常感谢,您的回答帮助了我。