@@ -90,27 +90,68 @@ tester.run('html-self-closing', rule, {
90
90
{
91
91
code : '<template><div></div></template>' ,
92
92
output : '<template><div/></template>' ,
93
- errors : [ 'Require self-closing on HTML elements (<div>).' ]
93
+ errors : [
94
+ {
95
+ message : 'Require self-closing on HTML elements (<div>).' ,
96
+ line : 1 ,
97
+ column : 16 ,
98
+ endLine : 1 ,
99
+ endColumn : 22
100
+ }
101
+ ]
94
102
} ,
95
103
{
96
104
code : '<template><img/></template>' ,
97
105
output : '<template><img></template>' ,
98
- errors : [ 'Disallow self-closing on HTML void elements (<img/>).' ]
106
+ errors : [
107
+ {
108
+ message : 'Disallow self-closing on HTML void elements (<img/>).' ,
109
+ line : 1 ,
110
+ column : 15 ,
111
+ endLine : 1 ,
112
+ endColumn : 17
113
+ }
114
+ ]
99
115
} ,
100
116
{
101
117
code : '<template><x-test></x-test></template>' ,
102
118
output : '<template><x-test/></template>' ,
103
- errors : [ 'Require self-closing on Vue.js custom components (<x-test>).' ]
119
+ errors : [
120
+ {
121
+ message :
122
+ 'Require self-closing on Vue.js custom components (<x-test>).' ,
123
+ line : 1 ,
124
+ column : 19 ,
125
+ endLine : 1 ,
126
+ endColumn : 28
127
+ }
128
+ ]
104
129
} ,
105
130
{
106
131
code : '<template><svg><path></path></svg></template>' ,
107
132
output : '<template><svg><path/></svg></template>' ,
108
- errors : [ 'Require self-closing on SVG elements (<path>).' ]
133
+ errors : [
134
+ {
135
+ message : 'Require self-closing on SVG elements (<path>).' ,
136
+ line : 1 ,
137
+ column : 22 ,
138
+ endLine : 1 ,
139
+ endColumn : 29
140
+ }
141
+ ]
109
142
} ,
110
143
{
111
144
code : '<template><math><mspace></mspace></math></template>' ,
112
145
output : '<template><math><mspace/></math></template>' ,
113
- errors : [ 'Require self-closing on MathML elements (<mspace>).' ]
146
+ errors : [
147
+ {
148
+ message : 'Require self-closing on MathML elements (<mspace>).' ,
149
+ line : 1 ,
150
+ column : 25 ,
151
+ endLine : 1 ,
152
+ endColumn : 34
153
+ }
154
+ ]
114
155
} ,
115
156
116
157
// others
@@ -130,7 +171,13 @@ tester.run('html-self-closing', rule, {
130
171
</template>` ,
131
172
options : [ anyWith ( { html : { normal : 'always' } } ) ] ,
132
173
errors : [
133
- { message : 'Require self-closing on HTML elements (<div>).' , line : 2 }
174
+ {
175
+ message : 'Require self-closing on HTML elements (<div>).' ,
176
+ line : 2 ,
177
+ column : 8 ,
178
+ endLine : 2 ,
179
+ endColumn : 14
180
+ }
134
181
]
135
182
} ,
136
183
{
@@ -149,7 +196,13 @@ tester.run('html-self-closing', rule, {
149
196
</template>` ,
150
197
options : [ anyWith ( { html : { normal : 'never' } } ) ] ,
151
198
errors : [
152
- { message : 'Disallow self-closing on HTML elements (<div/>).' , line : 3 }
199
+ {
200
+ message : 'Disallow self-closing on HTML elements (<div/>).' ,
201
+ line : 3 ,
202
+ column : 7 ,
203
+ endLine : 3 ,
204
+ endColumn : 9
205
+ }
153
206
]
154
207
} ,
155
208
{
@@ -170,7 +223,10 @@ tester.run('html-self-closing', rule, {
170
223
errors : [
171
224
{
172
225
message : 'Require self-closing on HTML void elements (<img>).' ,
173
- line : 4
226
+ line : 4 ,
227
+ column : 3 ,
228
+ endLine : 4 ,
229
+ endColumn : 8
174
230
}
175
231
]
176
232
} ,
@@ -192,7 +248,10 @@ tester.run('html-self-closing', rule, {
192
248
errors : [
193
249
{
194
250
message : 'Disallow self-closing on HTML void elements (<img/>).' ,
195
- line : 5
251
+ line : 5 ,
252
+ column : 7 ,
253
+ endLine : 5 ,
254
+ endColumn : 9
196
255
}
197
256
]
198
257
} ,
@@ -215,7 +274,10 @@ tester.run('html-self-closing', rule, {
215
274
{
216
275
message :
217
276
'Require self-closing on Vue.js custom components (<x-test>).' ,
218
- line : 6
277
+ line : 6 ,
278
+ column : 11 ,
279
+ endLine : 6 ,
280
+ endColumn : 20
219
281
}
220
282
]
221
283
} ,
@@ -238,7 +300,10 @@ tester.run('html-self-closing', rule, {
238
300
{
239
301
message :
240
302
'Disallow self-closing on Vue.js custom components (<x-test/>).' ,
241
- line : 7
303
+ line : 7 ,
304
+ column : 10 ,
305
+ endLine : 7 ,
306
+ endColumn : 12
242
307
}
243
308
]
244
309
} ,
@@ -258,7 +323,13 @@ tester.run('html-self-closing', rule, {
258
323
</template>` ,
259
324
options : [ anyWith ( { svg : 'always' } ) ] ,
260
325
errors : [
261
- { message : 'Require self-closing on SVG elements (<path>).' , line : 8 }
326
+ {
327
+ message : 'Require self-closing on SVG elements (<path>).' ,
328
+ line : 8 ,
329
+ column : 14 ,
330
+ endLine : 8 ,
331
+ endColumn : 21
332
+ }
262
333
]
263
334
} ,
264
335
{
@@ -277,7 +348,13 @@ tester.run('html-self-closing', rule, {
277
348
</template>` ,
278
349
options : [ anyWith ( { svg : 'never' } ) ] ,
279
350
errors : [
280
- { message : 'Disallow self-closing on SVG elements (<path/>).' , line : 9 }
351
+ {
352
+ message : 'Disallow self-closing on SVG elements (<path/>).' ,
353
+ line : 9 ,
354
+ column : 13 ,
355
+ endLine : 9 ,
356
+ endColumn : 15
357
+ }
281
358
]
282
359
} ,
283
360
{
@@ -298,7 +375,10 @@ tester.run('html-self-closing', rule, {
298
375
errors : [
299
376
{
300
377
message : 'Require self-closing on MathML elements (<mspace>).' ,
301
- line : 10
378
+ line : 10 ,
379
+ column : 17 ,
380
+ endLine : 10 ,
381
+ endColumn : 26
302
382
}
303
383
]
304
384
} ,
@@ -320,7 +400,10 @@ tester.run('html-self-closing', rule, {
320
400
errors : [
321
401
{
322
402
message : 'Disallow self-closing on MathML elements (<mspace/>).' ,
323
- line : 11
403
+ line : 11 ,
404
+ column : 16 ,
405
+ endLine : 11 ,
406
+ endColumn : 18
324
407
}
325
408
]
326
409
}
0 commit comments