Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 1010 Bytes

component-definition-name-casing.md

File metadata and controls

47 lines (33 loc) · 1010 Bytes

enforce specific casing for component definition name (vue/component-definition-name-casing)

  • 🔧 The --fix option on the command line can automatically fix some of the problems reported by this rule.

Define a style for component definition name casing for consistency purposes.

📖 Rule Details

👍 Examples of correct code for PascalCase:

export default {
  name: 'MyComponent'
}
Vue.component('MyComponent', {
  
})

👍 Examples of correct code for kebab-case:

export default {
  name: 'my-component'
}
Vue.component('my-component', {
  
})

🔧 Options

Default casing is set to PascalCase.

{
  "vue/component-definition-name-casing": ["error", "PascalCase|kebab-case"]
}

Related links