Skip to content

vue/name-property-casing

强制 Vue 组件中 name 属性使用特定大小写

📖 规则详情

此规则旨在强制 name 属性大小写的样式以保持一致性。

¥This rule aims at enforcing the style for the name property casing for consistency purposes.

Now loading...
Now loading...

🔧选项

¥🔧 Options

json
{
  "vue/name-property-casing": ["error", "PascalCase" | "kebab-case"]
}
  • "PascalCase"(默认)...强制 name 属性为 Pascal 大小写。

    ¥"PascalCase" (default) ... Enforce the name property to Pascal case.

  • "kebab-case" ...强制 name 属性采用短横线大小写。

    ¥"kebab-case" ... Enforce the name property to kebab case.

"kebab-case"

Now loading...
Now loading...

📚扩展阅读

¥📚 Further Reading

🚀版本

¥🚀 Version

此规则在 eslint-plugin-vue v3.8.0 中引入

¥This rule was introduced in eslint-plugin-vue v3.8.0

🔍代码实现

¥🔍 Implementation

eslint-plugin-vue v10.0 中文网 - 粤ICP备13048890号