@@ -18,10 +18,10 @@ This rule enforces using hyphenated attribute names on custom components in Vue
18
18
19
19
``` vue
20
20
<template>
21
- <!-- ✔ GOOD -->
21
+ <!-- ✓ GOOD -->
22
22
<MyComponent my-prop="prop" />
23
23
24
- <!-- ✘ BAD -->
24
+ <!-- ✗ BAD -->
25
25
<MyComponent myProp="prop" />
26
26
</template>
27
27
```
@@ -51,10 +51,10 @@ It errors on upper case letters.
51
51
52
52
``` vue
53
53
<template>
54
- <!-- ✔ GOOD -->
54
+ <!-- ✓ GOOD -->
55
55
<MyComponent my-prop="prop" />
56
56
57
- <!-- ✘ BAD -->
57
+ <!-- ✗ BAD -->
58
58
<MyComponent myProp="prop" />
59
59
</template>
60
60
```
@@ -68,34 +68,34 @@ It errors on hyphens except `data-`, `aria-` and `slot-scope`.
68
68
69
69
``` vue
70
70
<template>
71
- <!-- ✔ GOOD -->
71
+ <!-- ✓ GOOD -->
72
72
<MyComponent myProp="prop" />
73
73
<MyComponent data-id="prop" />
74
74
<MyComponent aria-role="button" />
75
75
<MyComponent slot-scope="prop" />
76
76
77
- <!-- ✘ BAD -->
77
+ <!-- ✗ BAD -->
78
78
<MyComponent my-prop="prop" />
79
79
</template>
80
80
```
81
81
82
82
</eslint-code-block >
83
83
84
- ### ` "never", { "ignore": ["custom-prop"] } `
84
+ ### ` "never", { "ignore": ["custom-prop"] } `
85
85
Don't use hyphenated name but allow custom attributes
86
86
87
87
<eslint-code-block fix :rules =" {'vue/attribute-hyphenation': ['error', 'never', { ignore: ['custom-prop']}]} " >
88
88
89
89
``` vue
90
90
<template>
91
- <!-- ✔ GOOD -->
91
+ <!-- ✓ GOOD -->
92
92
<MyComponent myProp="prop" />
93
93
<MyComponent custom-prop="prop" />
94
94
<MyComponent data-id="prop" />
95
95
<MyComponent aria-role="button" />
96
96
<MyComponent slot-scope="prop" />
97
97
98
- <!-- ✘ BAD -->
98
+ <!-- ✗ BAD -->
99
99
<MyComponent my-prop="prop" />
100
100
</template>
101
101
```
0 commit comments