@@ -45,8 +45,8 @@ ruleTester.run('attribute-hyphenation', rule, {
45
45
} ,
46
46
{
47
47
filename : 'test.vue' ,
48
- code : '<template><custom data-id="foo" aria-test="bar" slot-scope="{ data }" custom-hypen="foo"><a onClick="" my-prop="prop"></a></custom></template>' ,
49
- options : [ 'never' , { 'ignore' : [ 'custom-hypen' ] } ]
48
+ code : '<template><custom data-id="foo" aria-test="bar" slot-scope="{ data }" custom-hypen="foo" second-custom="bar" ><a onClick="" my-prop="prop"></a></custom></template>' ,
49
+ options : [ 'never' , { 'ignore' : [ 'custom-hypen' , 'second-custom' ] } ]
50
50
}
51
51
] ,
52
52
@@ -117,6 +117,28 @@ ruleTester.run('attribute-hyphenation', rule, {
117
117
line : 1
118
118
} ]
119
119
} ,
120
+ {
121
+ filename : 'test.vue' ,
122
+ code : '<template><div><custom v-bind:MyProp="prop"></custom></div></template>' ,
123
+ output : '<template><div><custom v-bind:my-prop="prop"></custom></div></template>' ,
124
+ options : [ 'always' , { 'ignore' : [ ] } ] ,
125
+ errors : [ {
126
+ message : "Attribute 'v-bind:MyProp' must be hyphenated." ,
127
+ type : 'VDirectiveKey' ,
128
+ line : 1
129
+ } ]
130
+ } ,
131
+ {
132
+ filename : 'test.vue' ,
133
+ code : '<template><custom data-id="foo" aria-test="bar" slot-scope="{ data }" custom-hypen="foo" third-custom="bar"><a onClick="" my-prop="prop"></a></custom></template>' ,
134
+ output : '<template><custom data-id="foo" aria-test="bar" slot-scope="{ data }" custom-hypen="foo" thirdCustom="bar"><a onClick="" my-prop="prop"></a></custom></template>' ,
135
+ options : [ 'never' , { 'ignore' : [ 'custom-hypen' , 'second-custom' ] } ] ,
136
+ errors : [ {
137
+ message : "Attribute 'third-custom' cann't be hyphenated." ,
138
+ type : 'VDirectiveKey' ,
139
+ line : 1
140
+ } ]
141
+ } ,
120
142
{
121
143
// This is the same code as the `'ignore': ['custom-hypen']`
122
144
// valid test; to verify that setting ignore actually makes the
0 commit comments