Skip to content

Latest commit

 

History

History
53 lines (40 loc) · 931 Bytes

attribute-hyphenation.md

File metadata and controls

53 lines (40 loc) · 931 Bytes

Define if attributes on cusom components can be hyphened. (attribute-hyphenation)

🔧 Options

Default casing is set to always

'vue/attribute-hyphenation': [2, 'always'|'never']

"always" - Use hyphenated name. (It errors on upper case letters.)

👍 Examples of correct code`:

<template>
  <foo my-prop="prop">
    <a onClick="return false"></a>
  </foo>
</template>

👎 Examples of incorrect code`:

<template>
  <foo myProp="prop">
    <a onClick="return false"></a>
  </foo>
</template>

"never" - Don't use hyphenated name. (It errors on hyphens except data- and aria-.)

👍 Examples of correct code`:

<template>
  <foo myProp="prop">
    <a onClick="return false"></a>
  </foo>
</template>

👎 Examples of incorrect code`:

<template>
  <foo my-prop="prop">
    <a onClick="return false"></a>
  </foo>
</template>