@@ -74,11 +74,17 @@ tester.run('no-extra-parens', rule, {
7474 errors : [
7575 {
7676 messageId : 'unexpected' ,
77- line : 4
77+ line : 4 ,
78+ column : 27 ,
79+ endLine : 4 ,
80+ endColumn : 28
7881 } ,
7982 {
8083 messageId : 'unexpected' ,
81- line : 5
84+ line : 5 ,
85+ column : 28 ,
86+ endLine : 5 ,
87+ endColumn : 29
8288 }
8389 ]
8490 } ,
@@ -104,7 +110,10 @@ tester.run('no-extra-parens', rule, {
104110 errors : [
105111 {
106112 messageId : 'unexpected' ,
107- line : 5
113+ line : 5 ,
114+ column : 16 ,
115+ endLine : 5 ,
116+ endColumn : 17
108117 }
109118 // valid in eslint v6.0
110119 // {
@@ -129,7 +138,10 @@ tester.run('no-extra-parens', rule, {
129138 errors : [
130139 {
131140 messageId : 'unexpected' ,
132- line : 4
141+ line : 4 ,
142+ column : 19 ,
143+ endLine : 4 ,
144+ endColumn : 20
133145 }
134146 ]
135147 } ,
@@ -139,71 +151,157 @@ tester.run('no-extra-parens', rule, {
139151 errors : [
140152 {
141153 messageId : 'unexpected' ,
142- column : 27
154+ column : 27 ,
155+ line : 1 ,
156+ endLine : 1 ,
157+ endColumn : 28
143158 }
144159 ]
145160 } ,
146161 {
147162 code : '<template><button :class="(a+b) | filter" /></template>' ,
148163 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+ ]
150173 } ,
151174 {
152175 code : '<template><button :class="((a+b | bitwise))" /></template>' ,
153176 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+ ]
155186 } ,
156187 {
157188 code : '<template><button>{{ (foo + bar) }}</button></template>' ,
158189 output : '<template><button>{{ foo + bar }}</button></template>' ,
159190 errors : [
160191 {
161192 messageId : 'unexpected' ,
162- column : 22
193+ column : 22 ,
194+ line : 1 ,
195+ endLine : 1 ,
196+ endColumn : 23
163197 }
164198 ]
165199 } ,
166200 {
167201 code : '<template><button>{{ (foo + bar) | filter }}</button></template>' ,
168202 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+ ]
170212 } ,
171213 {
172214 code : '<template><button>{{ ((foo + bar | bitwise)) }}</button></template>' ,
173215 output :
174216 '<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+ ]
176226 } ,
177227 {
178228 code : '<template><button>{{ ((foo | bitwise)) | filter }}</button></template>' ,
179229 output :
180230 '<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+ ]
182240 } ,
183241 {
184242 code : '<template><button>{{ (foo(bar|bitwise)) }}</button></template>' ,
185243 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+ ]
187253 } ,
188254 {
189255 code : '<template><button>{{ ([foo|bitwise]) }}</button></template>' ,
190256 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+ ]
192266 } ,
193267 {
194268 code : '<template><button>{{ ({foo:bar|bitwise}) }}</button></template>' ,
195269 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+ ]
197279 } ,
198280 {
199281 code : '<template><button>{{ ((function () {} ())) }}</button></template>' ,
200282 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+ ]
202292 } ,
203293 {
204294 code : '<template><button>{{ ((function () {})()) }}</button></template>' ,
205295 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+ ]
207305 } ,
208306 // CSS vars injection
209307 {
@@ -219,7 +317,15 @@ tester.run('no-extra-parens', rule, {
219317 color: v-bind('a')
220318 }
221319 </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+ ]
223329 }
224330 ]
225331} )
0 commit comments