@@ -74,11 +74,17 @@ tester.run('no-extra-parens', rule, {
74
74
errors : [
75
75
{
76
76
messageId : 'unexpected' ,
77
- line : 4
77
+ line : 4 ,
78
+ column : 27 ,
79
+ endLine : 4 ,
80
+ endColumn : 28
78
81
} ,
79
82
{
80
83
messageId : 'unexpected' ,
81
- line : 5
84
+ line : 5 ,
85
+ column : 28 ,
86
+ endLine : 5 ,
87
+ endColumn : 29
82
88
}
83
89
]
84
90
} ,
@@ -104,7 +110,10 @@ tester.run('no-extra-parens', rule, {
104
110
errors : [
105
111
{
106
112
messageId : 'unexpected' ,
107
- line : 5
113
+ line : 5 ,
114
+ column : 16 ,
115
+ endLine : 5 ,
116
+ endColumn : 17
108
117
}
109
118
// valid in eslint v6.0
110
119
// {
@@ -129,7 +138,10 @@ tester.run('no-extra-parens', rule, {
129
138
errors : [
130
139
{
131
140
messageId : 'unexpected' ,
132
- line : 4
141
+ line : 4 ,
142
+ column : 19 ,
143
+ endLine : 4 ,
144
+ endColumn : 20
133
145
}
134
146
]
135
147
} ,
@@ -139,71 +151,157 @@ tester.run('no-extra-parens', rule, {
139
151
errors : [
140
152
{
141
153
messageId : 'unexpected' ,
142
- column : 27
154
+ column : 27 ,
155
+ line : 1 ,
156
+ endLine : 1 ,
157
+ endColumn : 28
143
158
}
144
159
]
145
160
} ,
146
161
{
147
162
code : '<template><button :class="(a+b) | filter" /></template>' ,
148
163
output : '<template><button :class="a+b | filter" /></template>' ,
149
- errors : [ { messageId : 'unexpected' } ]
164
+ errors : [
165
+ {
166
+ messageId : 'unexpected' ,
167
+ line : 1 ,
168
+ column : 27 ,
169
+ endLine : 1 ,
170
+ endColumn : 28
171
+ }
172
+ ]
150
173
} ,
151
174
{
152
175
code : '<template><button :class="((a+b | bitwise))" /></template>' ,
153
176
output : '<template><button :class="(a+b | bitwise)" /></template>' ,
154
- errors : [ { messageId : 'unexpected' } ]
177
+ errors : [
178
+ {
179
+ messageId : 'unexpected' ,
180
+ line : 1 ,
181
+ column : 28 ,
182
+ endLine : 1 ,
183
+ endColumn : 29
184
+ }
185
+ ]
155
186
} ,
156
187
{
157
188
code : '<template><button>{{ (foo + bar) }}</button></template>' ,
158
189
output : '<template><button>{{ foo + bar }}</button></template>' ,
159
190
errors : [
160
191
{
161
192
messageId : 'unexpected' ,
162
- column : 22
193
+ column : 22 ,
194
+ line : 1 ,
195
+ endLine : 1 ,
196
+ endColumn : 23
163
197
}
164
198
]
165
199
} ,
166
200
{
167
201
code : '<template><button>{{ (foo + bar) | filter }}</button></template>' ,
168
202
output : '<template><button>{{ foo + bar | filter }}</button></template>' ,
169
- errors : [ { messageId : 'unexpected' } ]
203
+ errors : [
204
+ {
205
+ messageId : 'unexpected' ,
206
+ line : 1 ,
207
+ column : 22 ,
208
+ endLine : 1 ,
209
+ endColumn : 23
210
+ }
211
+ ]
170
212
} ,
171
213
{
172
214
code : '<template><button>{{ ((foo + bar | bitwise)) }}</button></template>' ,
173
215
output :
174
216
'<template><button>{{ (foo + bar | bitwise) }}</button></template>' ,
175
- errors : [ { messageId : 'unexpected' } ]
217
+ errors : [
218
+ {
219
+ messageId : 'unexpected' ,
220
+ line : 1 ,
221
+ column : 23 ,
222
+ endLine : 1 ,
223
+ endColumn : 24
224
+ }
225
+ ]
176
226
} ,
177
227
{
178
228
code : '<template><button>{{ ((foo | bitwise)) | filter }}</button></template>' ,
179
229
output :
180
230
'<template><button>{{ (foo | bitwise) | filter }}</button></template>' ,
181
- errors : [ { messageId : 'unexpected' } ]
231
+ errors : [
232
+ {
233
+ messageId : 'unexpected' ,
234
+ line : 1 ,
235
+ column : 23 ,
236
+ endLine : 1 ,
237
+ endColumn : 24
238
+ }
239
+ ]
182
240
} ,
183
241
{
184
242
code : '<template><button>{{ (foo(bar|bitwise)) }}</button></template>' ,
185
243
output : '<template><button>{{ foo(bar|bitwise) }}</button></template>' ,
186
- errors : [ { messageId : 'unexpected' } ]
244
+ errors : [
245
+ {
246
+ messageId : 'unexpected' ,
247
+ line : 1 ,
248
+ column : 22 ,
249
+ endLine : 1 ,
250
+ endColumn : 23
251
+ }
252
+ ]
187
253
} ,
188
254
{
189
255
code : '<template><button>{{ ([foo|bitwise]) }}</button></template>' ,
190
256
output : '<template><button>{{ [foo|bitwise] }}</button></template>' ,
191
- errors : [ { messageId : 'unexpected' } ]
257
+ errors : [
258
+ {
259
+ messageId : 'unexpected' ,
260
+ line : 1 ,
261
+ column : 22 ,
262
+ endLine : 1 ,
263
+ endColumn : 23
264
+ }
265
+ ]
192
266
} ,
193
267
{
194
268
code : '<template><button>{{ ({foo:bar|bitwise}) }}</button></template>' ,
195
269
output : '<template><button>{{ {foo:bar|bitwise} }}</button></template>' ,
196
- errors : [ { messageId : 'unexpected' } ]
270
+ errors : [
271
+ {
272
+ messageId : 'unexpected' ,
273
+ line : 1 ,
274
+ column : 22 ,
275
+ endLine : 1 ,
276
+ endColumn : 23
277
+ }
278
+ ]
197
279
} ,
198
280
{
199
281
code : '<template><button>{{ ((function () {} ())) }}</button></template>' ,
200
282
output : '<template><button>{{ (function () {} ()) }}</button></template>' ,
201
- errors : [ { messageId : 'unexpected' } ]
283
+ errors : [
284
+ {
285
+ messageId : 'unexpected' ,
286
+ line : 1 ,
287
+ column : 23 ,
288
+ endLine : 1 ,
289
+ endColumn : 24
290
+ }
291
+ ]
202
292
} ,
203
293
{
204
294
code : '<template><button>{{ ((function () {})()) }}</button></template>' ,
205
295
output : '<template><button>{{ (function () {})() }}</button></template>' ,
206
- errors : [ { messageId : 'unexpected' } ]
296
+ errors : [
297
+ {
298
+ messageId : 'unexpected' ,
299
+ line : 1 ,
300
+ column : 22 ,
301
+ endLine : 1 ,
302
+ endColumn : 23
303
+ }
304
+ ]
207
305
} ,
208
306
// CSS vars injection
209
307
{
@@ -219,7 +317,15 @@ tester.run('no-extra-parens', rule, {
219
317
color: v-bind('a')
220
318
}
221
319
</style>` ,
222
- errors : [ { messageId : 'unexpected' } ]
320
+ errors : [
321
+ {
322
+ messageId : 'unexpected' ,
323
+ line : 4 ,
324
+ column : 24 ,
325
+ endLine : 4 ,
326
+ endColumn : 25
327
+ }
328
+ ]
223
329
}
224
330
]
225
331
} )
0 commit comments