@@ -62,36 +62,84 @@ tester.run('no-duplicate-attributes', rule, {
62
62
{
63
63
filename : 'test.vue' ,
64
64
code : '<template><div><div foo v-bind:foo></div></div></template>' ,
65
- errors : [ "Duplicate attribute 'foo'." ]
65
+ errors : [
66
+ {
67
+ message : "Duplicate attribute 'foo'." ,
68
+ line : 1 ,
69
+ column : 25 ,
70
+ endLine : 1 ,
71
+ endColumn : 35
72
+ }
73
+ ]
66
74
} ,
67
75
{
68
76
filename : 'test.vue' ,
69
77
code : '<template><div><div foo :foo></div></div></template>' ,
70
- errors : [ "Duplicate attribute 'foo'." ]
78
+ errors : [
79
+ {
80
+ message : "Duplicate attribute 'foo'." ,
81
+ line : 1 ,
82
+ column : 25 ,
83
+ endLine : 1 ,
84
+ endColumn : 29
85
+ }
86
+ ]
71
87
} ,
72
88
{
73
89
filename : 'test.vue' ,
74
90
code : '<template><div><div style :style></div></div></template>' ,
75
91
options : [ { allowCoexistStyle : false } ] ,
76
- errors : [ "Duplicate attribute 'style'." ]
92
+ errors : [
93
+ {
94
+ message : "Duplicate attribute 'style'." ,
95
+ line : 1 ,
96
+ column : 27 ,
97
+ endLine : 1 ,
98
+ endColumn : 33
99
+ }
100
+ ]
77
101
} ,
78
102
{
79
103
filename : 'test.vue' ,
80
104
code : '<template><div><div class :class></div></div></template>' ,
81
105
options : [ { allowCoexistClass : false } ] ,
82
- errors : [ "Duplicate attribute 'class'." ]
106
+ errors : [
107
+ {
108
+ message : "Duplicate attribute 'class'." ,
109
+ line : 1 ,
110
+ column : 27 ,
111
+ endLine : 1 ,
112
+ endColumn : 33
113
+ }
114
+ ]
83
115
} ,
84
116
{
85
117
filename : 'test.vue' ,
86
118
code : '<template><div><div :style style></div></div></template>' ,
87
119
options : [ { allowCoexistStyle : false } ] ,
88
- errors : [ "Duplicate attribute 'style'." ]
120
+ errors : [
121
+ {
122
+ message : "Duplicate attribute 'style'." ,
123
+ line : 1 ,
124
+ column : 28 ,
125
+ endLine : 1 ,
126
+ endColumn : 33
127
+ }
128
+ ]
89
129
} ,
90
130
{
91
131
filename : 'test.vue' ,
92
132
code : '<template><div><div :class class></div></div></template>' ,
93
133
options : [ { allowCoexistClass : false } ] ,
94
- errors : [ "Duplicate attribute 'class'." ]
134
+ errors : [
135
+ {
136
+ message : "Duplicate attribute 'class'." ,
137
+ line : 1 ,
138
+ column : 28 ,
139
+ endLine : 1 ,
140
+ endColumn : 33
141
+ }
142
+ ]
95
143
}
96
144
]
97
145
} )
0 commit comments