@@ -157,7 +157,15 @@ ruleTester.run('no-duplicate-attr-inheritance', rule, {
157
157
{
158
158
filename : 'test.vue' ,
159
159
code : '<template><div><div v-bind="$attrs"></div></div></template>' ,
160
- errors : [ 'Set "inheritAttrs" to false.' ]
160
+ errors : [
161
+ {
162
+ message : 'Set "inheritAttrs" to false.' ,
163
+ line : 1 ,
164
+ column : 29 ,
165
+ endLine : 1 ,
166
+ endColumn : 35
167
+ }
168
+ ]
161
169
} ,
162
170
{
163
171
filename : 'test.vue' ,
@@ -169,7 +177,15 @@ ruleTester.run('no-duplicate-attr-inheritance', rule, {
169
177
}
170
178
</script>
171
179
` ,
172
- errors : [ 'Set "inheritAttrs" to false.' ]
180
+ errors : [
181
+ {
182
+ message : 'Set "inheritAttrs" to false.' ,
183
+ line : 2 ,
184
+ column : 37 ,
185
+ endLine : 2 ,
186
+ endColumn : 43
187
+ }
188
+ ]
173
189
} ,
174
190
{
175
191
filename : 'test.vue' ,
@@ -184,7 +200,10 @@ ruleTester.run('no-duplicate-attr-inheritance', rule, {
184
200
errors : [
185
201
{
186
202
message : 'Set "inheritAttrs" to false.' ,
187
- line : 7
203
+ line : 7 ,
204
+ column : 30 ,
205
+ endLine : 7 ,
206
+ endColumn : 36
188
207
}
189
208
]
190
209
} ,
@@ -199,15 +218,26 @@ ruleTester.run('no-duplicate-attr-inheritance', rule, {
199
218
errors : [
200
219
{
201
220
message : 'Set "inheritAttrs" to false.' ,
202
- line : 5
221
+ line : 5 ,
222
+ column : 30 ,
223
+ endLine : 5 ,
224
+ endColumn : 36
203
225
}
204
226
]
205
227
} ,
206
228
{
207
229
filename : 'test.vue' ,
208
230
code : `<template><div v-bind="$attrs"></div><div></div></template>` ,
209
231
options : [ { checkMultiRootNodes : true } ] ,
210
- errors : [ { message : 'Set "inheritAttrs" to false.' } ]
232
+ errors : [
233
+ {
234
+ message : 'Set "inheritAttrs" to false.' ,
235
+ line : 1 ,
236
+ column : 24 ,
237
+ endLine : 1 ,
238
+ endColumn : 30
239
+ }
240
+ ]
211
241
} ,
212
242
{
213
243
filename : 'test.vue' ,
@@ -219,7 +249,15 @@ ruleTester.run('no-duplicate-attr-inheritance', rule, {
219
249
</template>
220
250
` ,
221
251
options : [ { checkMultiRootNodes : true } ] ,
222
- errors : [ { message : 'Set "inheritAttrs" to false.' } ]
252
+ errors : [
253
+ {
254
+ message : 'Set "inheritAttrs" to false.' ,
255
+ line : 3 ,
256
+ column : 40 ,
257
+ endLine : 3 ,
258
+ endColumn : 46
259
+ }
260
+ ]
223
261
} ,
224
262
// condition group as a single root node
225
263
{
@@ -231,7 +269,15 @@ ruleTester.run('no-duplicate-attr-inheritance', rule, {
231
269
<div v-else></div>
232
270
</template>
233
271
` ,
234
- errors : [ { message : 'Set "inheritAttrs" to false.' } ]
272
+ errors : [
273
+ {
274
+ message : 'Set "inheritAttrs" to false.' ,
275
+ line : 3 ,
276
+ column : 40 ,
277
+ endLine : 3 ,
278
+ endColumn : 46
279
+ }
280
+ ]
235
281
} ,
236
282
{
237
283
filename : 'test.vue' ,
@@ -243,7 +289,15 @@ ruleTester.run('no-duplicate-attr-inheritance', rule, {
243
289
<div v-else></div>
244
290
</template>
245
291
` ,
246
- errors : [ { message : 'Set "inheritAttrs" to false.' } ]
292
+ errors : [
293
+ {
294
+ message : 'Set "inheritAttrs" to false.' ,
295
+ line : 3 ,
296
+ column : 40 ,
297
+ endLine : 3 ,
298
+ endColumn : 46
299
+ }
300
+ ]
247
301
} ,
248
302
{
249
303
filename : 'test.vue' ,
@@ -253,7 +307,15 @@ ruleTester.run('no-duplicate-attr-inheritance', rule, {
253
307
<div v-else></div>
254
308
</template>
255
309
` ,
256
- errors : [ { message : 'Set "inheritAttrs" to false.' } ]
310
+ errors : [
311
+ {
312
+ message : 'Set "inheritAttrs" to false.' ,
313
+ line : 3 ,
314
+ column : 40 ,
315
+ endLine : 3 ,
316
+ endColumn : 46
317
+ }
318
+ ]
257
319
} ,
258
320
{
259
321
filename : 'test.vue' ,
@@ -262,7 +324,15 @@ ruleTester.run('no-duplicate-attr-inheritance', rule, {
262
324
<div v-if="condition1" v-bind="$attrs"></div>
263
325
</template>
264
326
` ,
265
- errors : [ { message : 'Set "inheritAttrs" to false.' } ]
327
+ errors : [
328
+ {
329
+ message : 'Set "inheritAttrs" to false.' ,
330
+ line : 3 ,
331
+ column : 40 ,
332
+ endLine : 3 ,
333
+ endColumn : 46
334
+ }
335
+ ]
266
336
}
267
337
]
268
338
} )
0 commit comments