Appearance
vue/no-undef-properties
禁止未定义的属性
¥disallow undefined properties
📖 规则详情
此规则警告使用未定义的属性。此规则可以帮助你找到由于属性名称拼写错误和隐式添加的属性而导致的潜在错误。
¥This rule warns of using undefined properties.\ This rule can help you locate potential errors resulting from misspellings property names, and implicitly added properties.
注意
此规则无法检测在其他文件或组件中定义的属性。请注意,如果你使用 mixins,则会出现许多误报。
¥This rule cannot detect properties defined in other files or components.\ Note that there are many false positives if you are using mixins.
🔧选项
¥🔧 Options
json
{
"vue/no-undef-properties": ["error", {
"ignores": ["/^\\$/"]
}]
}
ignores
(string[]
) ...已经定义属性的属性名称或模式数组,或要从检查中忽略的属性。默认值为["/^\\$/"]
。¥
ignores
(string[]
) ... An array of property names or patterns that have already been defined property, or property to ignore from the check. Default is["/^\\$/"]
.
"ignores": ["/^\\$/"]
(默认)
¥"ignores": ["/^\\$/"]
(default)
🚀版本
¥🚀 Version
此规则在 eslint-plugin-vue v7.20.0
¥This rule was introduced in eslint-plugin-vue v7.20.0
🔍代码实现
¥🔍 Implementation