@@ -30,12 +30,17 @@ ruleTester.run('attribute-hyphenation', rule, {
30
30
} ,
31
31
{
32
32
filename : 'test.vue' ,
33
- code : '<template><div><custom my-prop="prop"></custom></div></template>' ,
33
+ code : '<template><div><custom data-id="foo" aria-test="bar" my-prop="prop"></custom></div></template>' ,
34
34
options : [ 'always' ]
35
35
} ,
36
36
{
37
37
filename : 'test.vue' ,
38
- code : '<template><div><a onClick="" my-prop="prop"></a></div></template>' ,
38
+ code : '<template><div><custom data-id="foo" aria-test="bar" myProp="prop"></custom></div></template>' ,
39
+ options : [ 'never' ]
40
+ } ,
41
+ {
42
+ filename : 'test.vue' ,
43
+ code : '<template><div data-id="foo" aria-test="bar"><a onClick="" my-prop="prop"></a></div></template>' ,
39
44
options : [ 'never' ]
40
45
}
41
46
] ,
@@ -44,6 +49,7 @@ ruleTester.run('attribute-hyphenation', rule, {
44
49
{
45
50
filename : 'test.vue' ,
46
51
code : '<template><div><custom my-prop="prop"></custom></div></template>' ,
52
+ output : '<template><div><custom myProp="prop"></custom></div></template>' ,
47
53
options : [ 'never' ] ,
48
54
errors : [ {
49
55
message : "Attribute 'my-prop' cann't be hyphenated." ,
@@ -54,6 +60,7 @@ ruleTester.run('attribute-hyphenation', rule, {
54
60
{
55
61
filename : 'test.vue' ,
56
62
code : '<template><div><custom MyProp="prop"></custom></div></template>' ,
63
+ output : '<template><div><custom my-prop="prop"></custom></div></template>' ,
57
64
options : [ 'always' ] ,
58
65
errors : [ {
59
66
message : "Attribute 'MyProp' must be hyphenated." ,
@@ -64,6 +71,7 @@ ruleTester.run('attribute-hyphenation', rule, {
64
71
{
65
72
filename : 'test.vue' ,
66
73
code : '<template><div><custom :my-prop="prop"></custom></div></template>' ,
74
+ output : '<template><div><custom :myProp="prop"></custom></div></template>' ,
67
75
options : [ 'never' ] ,
68
76
errors : [ {
69
77
message : "Attribute ':my-prop' cann't be hyphenated." ,
@@ -74,6 +82,7 @@ ruleTester.run('attribute-hyphenation', rule, {
74
82
{
75
83
filename : 'test.vue' ,
76
84
code : '<template><div><custom :MyProp="prop"></custom></div></template>' ,
85
+ output : '<template><div><custom :my-prop="prop"></custom></div></template>' ,
77
86
options : [ 'always' ] ,
78
87
errors : [ {
79
88
message : "Attribute ':MyProp' must be hyphenated." ,
@@ -84,6 +93,7 @@ ruleTester.run('attribute-hyphenation', rule, {
84
93
{
85
94
filename : 'test.vue' ,
86
95
code : '<template><div><custom v-bind:my-prop="prop"></custom></div></template>' ,
96
+ output : '<template><div><custom v-bind:myProp="prop"></custom></div></template>' ,
87
97
options : [ 'never' ] ,
88
98
errors : [ {
89
99
message : "Attribute 'v-bind:my-prop' cann't be hyphenated." ,
@@ -94,6 +104,7 @@ ruleTester.run('attribute-hyphenation', rule, {
94
104
{
95
105
filename : 'test.vue' ,
96
106
code : '<template><div><custom v-bind:MyProp="prop"></custom></div></template>' ,
107
+ output : '<template><div><custom v-bind:my-prop="prop"></custom></div></template>' ,
97
108
options : [ 'always' ] ,
98
109
errors : [ {
99
110
message : "Attribute 'v-bind:MyProp' must be hyphenated." ,
0 commit comments