Appearance
vue/name-property-casing
强制 Vue 组件中 name 属性使用特定大小写
- ⛔ 此规则已在 eslint-plugin-vue v9.0.0 中删除,并由 vue/component-definition-name-casing 规则替换。
📖 规则详情
此规则旨在强制 name
属性大小写的样式以保持一致性。
¥This rule aims at enforcing the style for the name
property casing for consistency purposes.
🔧选项
¥🔧 Options
json
{
"vue/name-property-casing": ["error", "PascalCase" | "kebab-case"]
}
"PascalCase"
(默认)...强制name
属性为 Pascal 大小写。¥
"PascalCase"
(default) ... Enforce thename
property to Pascal case."kebab-case"
...强制name
属性采用短横线大小写。¥
"kebab-case"
... Enforce thename
property to kebab case.
"kebab-case"
📚扩展阅读
¥📚 Further Reading
🚀版本
¥🚀 Version
此规则在 eslint-plugin-vue v3.8.0 中引入
¥This rule was introduced in eslint-plugin-vue v3.8.0
🔍代码实现
¥🔍 Implementation