vue/no-undef-properties
禁止使用未定义的属性
📖 规则详情
此规则会警告使用未定义的属性。
此规则可以帮助您找到由于拼写错误的属性名称和隐式添加的属性而导致的潜在错误。
注意
此规则无法检测在其他文件或组件中定义的属性。
请注意,如果您使用 mixin,则会有很多误报。
🔧 选项
json
{
"vue/no-undef-properties": ["error", {
"ignores": ["/^\\$/"]
}]
}
ignores
(string[]
) ... 已定义属性或要忽略检查的属性的属性名称或模式数组。默认值为["/^\\$/"]
。
"ignores": ["/^\\$/"]
(默认)
🚀 版本
此规则是在 eslint-plugin-vue v7.20.0 中引入的