@@ -18,10 +18,10 @@ This rule enforces using hyphenated attribute names on custom components in Vue
1818
1919``` vue
2020<template>
21- <!-- ✔ GOOD -->
21+ <!-- ✓ GOOD -->
2222 <MyComponent my-prop="prop" />
2323
24- <!-- ✘ BAD -->
24+ <!-- ✗ BAD -->
2525 <MyComponent myProp="prop" />
2626</template>
2727```
@@ -51,10 +51,10 @@ It errors on upper case letters.
5151
5252``` vue
5353<template>
54- <!-- ✔ GOOD -->
54+ <!-- ✓ GOOD -->
5555 <MyComponent my-prop="prop" />
5656
57- <!-- ✘ BAD -->
57+ <!-- ✗ BAD -->
5858 <MyComponent myProp="prop" />
5959</template>
6060```
@@ -68,34 +68,34 @@ It errors on hyphens except `data-`, `aria-` and `slot-scope`.
6868
6969``` vue
7070<template>
71- <!-- ✔ GOOD -->
71+ <!-- ✓ GOOD -->
7272 <MyComponent myProp="prop" />
7373 <MyComponent data-id="prop" />
7474 <MyComponent aria-role="button" />
7575 <MyComponent slot-scope="prop" />
7676
77- <!-- ✘ BAD -->
77+ <!-- ✗ BAD -->
7878 <MyComponent my-prop="prop" />
7979</template>
8080```
8181
8282</eslint-code-block >
8383
84- ### ` "never", { "ignore": ["custom-prop"] } `
84+ ### ` "never", { "ignore": ["custom-prop"] } `
8585Don't use hyphenated name but allow custom attributes
8686
8787<eslint-code-block fix :rules =" {'vue/attribute-hyphenation': ['error', 'never', { ignore: ['custom-prop']}]} " >
8888
8989``` vue
9090<template>
91- <!-- ✔ GOOD -->
91+ <!-- ✓ GOOD -->
9292 <MyComponent myProp="prop" />
9393 <MyComponent custom-prop="prop" />
9494 <MyComponent data-id="prop" />
9595 <MyComponent aria-role="button" />
9696 <MyComponent slot-scope="prop" />
9797
98- <!-- ✘ BAD -->
98+ <!-- ✗ BAD -->
9999 <MyComponent my-prop="prop" />
100100</template>
101101```
0 commit comments