Skip to content

Latest commit

 

History

History
40 lines (26 loc) · 978 Bytes

attribute-hyphenation.md

File metadata and controls

40 lines (26 loc) · 978 Bytes

enforce attribute naming style in template (weex/vue/attribute-hyphenation)

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

🔧 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`:

<MyComponent my-prop="prop"/>

👎 Examples of incorrect code`:

<MyComponent myProp="prop"/>

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

👍 Examples of correct code`:

<MyComponent myProp="prop"/>

👎 Examples of incorrect code`:

<MyComponent my-prop="prop"/>