@@ -124,6 +124,12 @@ tester.run('v-bind-style', rule, {
124
124
filename : 'test.vue' ,
125
125
code : '<template><div :foo-bar/></template>' ,
126
126
options : [ 'shorthand' , { sameNameShorthand : 'always' } ]
127
+ } ,
128
+ {
129
+ // https://github.com/vuejs/eslint-plugin-vue/issues/2409
130
+ filename : 'test.vue' ,
131
+ code : '<template><div :foo-bar="foo_bar" /></template>' ,
132
+ options : [ 'shorthand' , { sameNameShorthand : 'always' } ]
127
133
}
128
134
] ,
129
135
invalid : [
@@ -235,6 +241,14 @@ tester.run('v-bind-style', rule, {
235
241
options : [ 'shorthand' , { sameNameShorthand : 'never' } ] ,
236
242
errors : [ unexpectedShorthand ]
237
243
} ,
244
+ {
245
+ // https://github.com/vuejs/eslint-plugin-vue/issues/2409
246
+ filename : 'test.vue' ,
247
+ code : '<template><div :foo_bar /></template>' ,
248
+ output : '<template><div :foo_bar="foo_bar" /></template>' ,
249
+ options : [ 'shorthand' , { sameNameShorthand : 'never' } ] ,
250
+ errors : [ unexpectedShorthand ]
251
+ } ,
238
252
// same-name shorthand: always
239
253
{
240
254
filename : 'test.vue' ,
@@ -243,6 +257,13 @@ tester.run('v-bind-style', rule, {
243
257
options : [ 'shorthand' , { sameNameShorthand : 'always' } ] ,
244
258
errors : [ expectedShorthand ]
245
259
} ,
260
+ {
261
+ filename : 'test.vue' ,
262
+ code : '<template><div :foo_bar="foo_bar" /></template>' ,
263
+ output : '<template><div :foo_bar /></template>' ,
264
+ options : [ 'shorthand' , { sameNameShorthand : 'always' } ] ,
265
+ errors : [ expectedShorthand ]
266
+ } ,
246
267
{
247
268
filename : 'test.vue' ,
248
269
code : '<template><div v-bind:foo="foo" /></template>' ,
0 commit comments