@@ -29,12 +29,28 @@ tester.run('dot-notation', rule, {
29
29
{
30
30
code : `<template><div :attr="foo['bar']" /></template>` ,
31
31
output : `<template><div :attr="foo.bar" /></template>` ,
32
- errors : [ '["bar"] is better written in dot notation.' ]
32
+ errors : [
33
+ {
34
+ message : '["bar"] is better written in dot notation.' ,
35
+ line : 1 ,
36
+ column : 27 ,
37
+ endLine : 1 ,
38
+ endColumn : 32
39
+ }
40
+ ]
33
41
} ,
34
42
{
35
43
code : `<template><div :[foo[\`bar\`]]="a" /></template>` ,
36
44
output : `<template><div :[foo.bar]="a" /></template>` ,
37
- errors : [ '[`bar`] is better written in dot notation.' ]
45
+ errors : [
46
+ {
47
+ message : '[`bar`] is better written in dot notation.' ,
48
+ line : 1 ,
49
+ column : 22 ,
50
+ endLine : 1 ,
51
+ endColumn : 27
52
+ }
53
+ ]
38
54
} ,
39
55
// CSS vars injection
40
56
{
@@ -50,7 +66,15 @@ tester.run('dot-notation', rule, {
50
66
color: v-bind(foo.bar)
51
67
}
52
68
</style>` ,
53
- errors : [ '[`bar`] is better written in dot notation.' ]
69
+ errors : [
70
+ {
71
+ message : '[`bar`] is better written in dot notation.' ,
72
+ line : 4 ,
73
+ column : 27 ,
74
+ endLine : 4 ,
75
+ endColumn : 32
76
+ }
77
+ ]
54
78
} ,
55
79
{
56
80
code : `
@@ -65,7 +89,15 @@ tester.run('dot-notation', rule, {
65
89
color: v-bind("foo.bar")
66
90
}
67
91
</style>` ,
68
- errors : [ '[`bar`] is better written in dot notation.' ]
92
+ errors : [
93
+ {
94
+ message : '[`bar`] is better written in dot notation.' ,
95
+ line : 4 ,
96
+ column : 28 ,
97
+ endLine : 4 ,
98
+ endColumn : 33
99
+ }
100
+ ]
69
101
}
70
102
]
71
103
} )
0 commit comments