Note

This is a documentation for version 7.0.0-beta.2.
To check version 6.2.2 go here. To check previous releases go here.

# vue/name-property-casing

enforce specific casing for the name property in Vue components

# 📖 Rule Details

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

<script> /* ✓ GOOD */ export default { name: 'MyComponent' } </script>
Now loading...
<script> /* ✗ BAD */ export default { name: 'my-component' } </script>
Now loading...

# 🔧 Options

{
  "vue/name-property-casing": ["error", "PascalCase" | "kebab-case"]
}
  • "PascalCase" (default) ... Enforce the name property to Pascal case.
  • "kebab-case" ... Enforce the name property to kebab case.

# "kebab-case"

<script> /* ✓ GOOD */ export default { name: 'my-component' } </script>
Now loading...
<script> /* ✗ BAD */ export default { name: 'MyComponent' } </script>
Now loading...

# 📚 Further Reading

# 🔍 Implementation