Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 987 Bytes

name-property-casing.md

File metadata and controls

36 lines (24 loc) · 987 Bytes

enforce specific casing for the name property in Vue components (vue/name-property-casing)

  • ⚙️ This rule is included in "plugin:vue/strongly-recommended" and "plugin:vue/recommended".
  • 🔧 The --fix option on the command line can automatically fix some of the problems reported by this rule.

Define a style for the name property casing for consistency purposes.

📖 Rule Details

👍 Examples of correct code for PascalCase:

export default {
  name: 'MyComponent'
}

👍 Examples of correct code for kebab-case:

export default {
  name: 'my-component'
}

🔧 Options

Default casing is set to PascalCase.

"vue/name-property-casing": ["error", "PascalCase|kebab-case"]

Related links