@@ -124,6 +124,12 @@ tester.run('v-bind-style', rule, {
124124 filename : 'test.vue' ,
125125 code : '<template><div :foo-bar/></template>' ,
126126 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' } ]
127133 }
128134 ] ,
129135 invalid : [
@@ -235,6 +241,14 @@ tester.run('v-bind-style', rule, {
235241 options : [ 'shorthand' , { sameNameShorthand : 'never' } ] ,
236242 errors : [ unexpectedShorthand ]
237243 } ,
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+ } ,
238252 // same-name shorthand: always
239253 {
240254 filename : 'test.vue' ,
@@ -243,6 +257,13 @@ tester.run('v-bind-style', rule, {
243257 options : [ 'shorthand' , { sameNameShorthand : 'always' } ] ,
244258 errors : [ expectedShorthand ]
245259 } ,
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+ } ,
246267 {
247268 filename : 'test.vue' ,
248269 code : '<template><div v-bind:foo="foo" /></template>' ,
0 commit comments