22[TestNoConfusingVoidExpression / invalid - 0 - 1 ]
33Diagnostic 1 : invalidVoidExpr (2 :19 - 2 :36 )
44Message : Placing a void expression inside another expression is forbidden .
5+ Help : Move it to its own statement instead .
56 1 |
67 2 | const x = console .log (' foo' );
78 | ~~~~~~~~~~~~~~~~~~
@@ -11,6 +12,7 @@ Message: Placing a void expression inside another expression is forbidden.
1112[TestNoConfusingVoidExpression / invalid - 1 - 1 ]
1213Diagnostic 1 : invalidVoidExpr (2 :19 - 2 :37 )
1314Message : Placing a void expression inside another expression is forbidden .
15+ Help : Move it to its own statement instead .
1416 1 |
1517 2 | const x = console ? .log (' foo' );
1618 | ~~~~~~~~~~~~~~~~~~~
@@ -20,6 +22,7 @@ Message: Placing a void expression inside another expression is forbidden.
2022[TestNoConfusingVoidExpression / invalid - 10 - 1 ]
2123Diagnostic 1 : invalidVoidExpr (3 :17 - 3 :34 )
2224Message : Placing a void expression inside another expression is forbidden .
25+ Help : Move it to its own statement instead .
2326 2 | function notcool(input : string ) {
2427 3 | return input , console .log (input );
2528 | ~~~~~~~~~~~~~~~~~~
@@ -29,53 +32,61 @@ Message: Placing a void expression inside another expression is forbidden.
2932[TestNoConfusingVoidExpression / invalid - 11 - 1 ]
3033Diagnostic 1 : invalidVoidExprArrow (1 :7 - 1 :24 )
3134Message : Returning a void expression from an arrow function shorthand is forbidden.
35+ Help: Add braces to the arrow function .
3236 1 | () => console.log('foo ');
3337 | ~~~~~~~~~~~~~~~~~~
3438-- -
3539
3640[TestNoConfusingVoidExpression / invalid - 12 - 1 ]
3741Diagnostic 1 : invalidVoidExprArrow (1 :15 - 1 :30 )
3842Message : Returning a void expression from an arrow function shorthand is forbidden.
43+ Help: Add braces to the arrow function .
3944 1 | foo => foo && console.log(foo );
4045 | ~~~~~~~~~~~~~~~~
4146-- -
4247
4348[TestNoConfusingVoidExpression / invalid - 13 - 1 ]
4449Diagnostic 1 : invalidVoidExprArrow (1 :28 - 1 :43 )
4550Message : Returning a void expression from an arrow function shorthand is forbidden.
51+ Help: Add braces to the arrow function .
4652 1 | (foo : undefined ) => foo && console.log(foo );
4753 | ~~~~~~~~~~~~~~~~
4854-- -
4955
5056[TestNoConfusingVoidExpression / invalid - 14 - 1 ]
5157Diagnostic 1 : invalidVoidExprArrow (1 :15 - 1 :30 )
5258Message : Returning a void expression from an arrow function shorthand is forbidden.
59+ Help: Add braces to the arrow function .
5360 1 | foo => foo || console.log(foo );
5461 | ~~~~~~~~~~~~~~~~
5562-- -
5663
5764[TestNoConfusingVoidExpression / invalid - 15 - 1 ]
5865Diagnostic 1 : invalidVoidExprArrow (1 :28 - 1 :43 )
5966Message : Returning a void expression from an arrow function shorthand is forbidden.
67+ Help: Add braces to the arrow function .
6068 1 | (foo : undefined ) => foo || console.log(foo );
6169 | ~~~~~~~~~~~~~~~~
6270-- -
6371
6472[TestNoConfusingVoidExpression / invalid - 16 - 1 ]
6573Diagnostic 1 : invalidVoidExprArrow (1 :23 - 1 :38 )
6674Message : Returning a void expression from an arrow function shorthand is forbidden.
75+ Help: Add braces to the arrow function .
6776 1 | (foo : void ) => foo || console.log(foo );
6877 | ~~~~~~~~~~~~~~~~
6978-- -
7079
7180[TestNoConfusingVoidExpression / invalid - 17 - 1 ]
7281Diagnostic 1 : invalidVoidExprArrow (1 :15 - 1 :31 )
7382Message : Returning a void expression from an arrow function shorthand is forbidden.
83+ Help: Add braces to the arrow function .
7484 1 | foo => (foo ? console .log (true ) : console .log (false ));
7585 | ~~~~~~~~~~~~~~~~~
7686
7787Diagnostic 2 : invalidVoidExprArrow (1 :35 - 1 :52 )
7888Message : Returning a void expression from an arrow function shorthand is forbidden.
89+ Help: Add braces to the arrow function .
7990 1 | foo => (foo ? console .log (true ) : console .log (false ));
8091 | ~~~~~~~~~~~~~~~~~~
8192-- -
@@ -101,6 +112,7 @@ Message: Returning a void expression from a function is forbidden. Please move i
101112[TestNoConfusingVoidExpression/invalid-2 - 1]
102113Diagnostic 1: invalidVoidExpr (2: 23 - 2 :40 )
103114Message: Placing a void expression inside another expression is forbidden.
115+ Help: Move it to its own statement instead.
104116 1 |
105117 2 | console.error(console .log ('foo '));
106118 | ~~~~~~~~~~~~~~~~~~
@@ -182,6 +194,7 @@ Message: Returning a void expression from a function is forbidden. Please remove
182194[TestNoConfusingVoidExpression / invalid - 28 - 1 ]
183195Diagnostic 1 : invalidVoidExprArrow (3 :34 - 3 :51 )
184196Message : Returning a void expression from an arrow function shorthand is forbidden.
197+ Help: Add braces to the arrow function .
185198 2 | let num = 1;
186199 3 | const foo = () => (num ? console .log (' foo' ) : num );
187200 | ~~~~~~~~~~~~~~~~~~
@@ -191,6 +204,7 @@ Message: Returning a void expression from an arrow function shorthand is forbidd
191204[TestNoConfusingVoidExpression / invalid - 29 - 1 ]
192205Diagnostic 1 : invalidVoidExprArrow (3 :34 - 3 :51 )
193206Message : Returning a void expression from an arrow function shorthand is forbidden.
207+ Help: Add braces to the arrow function .
194208 2 | let bar = void 0;
195209 3 | const foo = () => (bar ? console .log (' foo' ) : bar );
196210 | ~~~~~~~~~~~~~~~~~~
@@ -200,6 +214,7 @@ Message: Returning a void expression from an arrow function shorthand is forbidd
200214[TestNoConfusingVoidExpression / invalid - 3 - 1 ]
201215Diagnostic 1 : invalidVoidExpr (2 :10 - 2 :27 )
202216Message : Placing a void expression inside another expression is forbidden .
217+ Help : Move it to its own statement instead .
203218 1 |
204219 2 | [console .log (' foo' )];
205220 | ~~~~~~~~~~~~~~~~~~
@@ -264,6 +279,7 @@ Message: Returning a void expression from a function is forbidden. Please remove
264279[TestNoConfusingVoidExpression / invalid - 37 - 1 ]
265280Diagnostic 1 : invalidVoidExprArrow (1 :20 - 1 :37 )
266281Message : Returning a void expression from an arrow function shorthand is forbidden.
282+ Help: Add braces to the arrow function .
267283 1 | const test = () => console.log('foo ');
268284 | ~~~~~~~~~~~~~~~~~~
269285-- -
@@ -289,6 +305,7 @@ Message: Returning a void expression from a function is forbidden. Please remove
289305[TestNoConfusingVoidExpression / invalid - 4 - 1 ]
290306Diagnostic 1 : invalidVoidExpr (2 :15 - 2 :32 )
291307Message : Placing a void expression inside another expression is forbidden .
308+ Help : Move it to its own statement instead .
292309 1 |
293310 2 | ({ x: console .log (' foo' ) });
294311 | ~~~~~~~~~~~~~~~~~~
@@ -298,6 +315,7 @@ Message: Placing a void expression inside another expression is forbidden.
298315[TestNoConfusingVoidExpression / invalid - 40 - 1 ]
299316Diagnostic 1 : invalidVoidExprArrow (2 :20 - 2 :37 )
300317Message : Returning a void expression from an arrow function shorthand is forbidden.
318+ Help: Add braces to the arrow function .
301319 1 |
302320 2 | (): any => console .log (' foo' );
303321 | ~~~~~~~~~~~~~~~~~~
@@ -307,6 +325,7 @@ Message: Returning a void expression from an arrow function shorthand is forbidd
307325[TestNoConfusingVoidExpression / invalid - 41 - 1 ]
308326Diagnostic 1 : invalidVoidExprArrow (2 :24 - 2 :41 )
309327Message : Returning a void expression from an arrow function shorthand is forbidden.
328+ Help: Add braces to the arrow function .
310329 1 |
311330 2 | (): unknown => console .log (' foo' );
312331 | ~~~~~~~~~~~~~~~~~~
@@ -316,6 +335,7 @@ Message: Returning a void expression from an arrow function shorthand is forbidd
316335[TestNoConfusingVoidExpression / invalid - 42 - 1 ]
317336Diagnostic 1 : invalidVoidExprArrow (3 :15 - 3 :27 )
318337Message : Returning a void expression from an arrow function shorthand is forbidden.
338+ Help: Add braces to the arrow function .
319339 2 | function test(): void {
320340 3 | () => () => console .log ();
321341 | ~~~~~~~~~~~~~
@@ -325,6 +345,7 @@ Message: Returning a void expression from an arrow function shorthand is forbidd
325345[TestNoConfusingVoidExpression / invalid - 43 - 1 ]
326346Diagnostic 1 : invalidVoidExprArrow (3 :12 - 3 :24 )
327347Message : Returning a void expression from an arrow function shorthand is forbidden.
348+ Help: Add braces to the arrow function .
328349 2 | type Foo = any;
329350 3 | (): Foo => console .log ();
330351 | ~~~~~~~~~~~~~
@@ -334,6 +355,7 @@ Message: Returning a void expression from an arrow function shorthand is forbidd
334355[TestNoConfusingVoidExpression / invalid - 44 - 1 ]
335356Diagnostic 1 : invalidVoidExprArrow (3 :12 - 3 :24 )
336357Message : Returning a void expression from an arrow function shorthand is forbidden.
358+ Help: Add braces to the arrow function .
337359 2 | type Foo = unknown;
338360 3 | (): Foo => console .log ();
339361 | ~~~~~~~~~~~~~
@@ -343,6 +365,7 @@ Message: Returning a void expression from an arrow function shorthand is forbidd
343365[TestNoConfusingVoidExpression / invalid - 45 - 1 ]
344366Diagnostic 1 : invalidVoidExprArrow (3 :15 - 3 :27 )
345367Message : Returning a void expression from an arrow function shorthand is forbidden.
368+ Help: Add braces to the arrow function .
346369 2 | function test(): any {
347370 3 | () => () => console .log ();
348371 | ~~~~~~~~~~~~~
@@ -370,6 +393,7 @@ Message: Returning a void expression from a function is forbidden. Please remove
370393[TestNoConfusingVoidExpression / invalid - 48 - 1 ]
371394Diagnostic 1 : invalidVoidExprArrow (3 :18 - 3 :30 )
372395Message : Returning a void expression from an arrow function shorthand is forbidden.
396+ Help: Add braces to the arrow function .
373397 2 | type Foo = () => any;
374398 3 | (): Foo => () => console .log ();
375399 | ~~~~~~~~~~~~~
@@ -379,6 +403,7 @@ Message: Returning a void expression from an arrow function shorthand is forbidd
379403[TestNoConfusingVoidExpression / invalid - 49 - 1 ]
380404Diagnostic 1 : invalidVoidExprArrow (3 :18 - 3 :30 )
381405Message : Returning a void expression from an arrow function shorthand is forbidden.
406+ Help: Add braces to the arrow function .
382407 2 | type Foo = () => unknown;
383408 3 | (): Foo => () => console .log ();
384409 | ~~~~~~~~~~~~~
@@ -388,6 +413,7 @@ Message: Returning a void expression from an arrow function shorthand is forbidd
388413[TestNoConfusingVoidExpression / invalid - 5 - 1 ]
389414Diagnostic 1 : invalidVoidExpr (2 :14 - 2 :31 )
390415Message : Placing a void expression inside another expression is forbidden .
416+ Help : Move it to its own statement instead .
391417 1 |
392418 2 | void console .log (' foo' );
393419 | ~~~~~~~~~~~~~~~~~~
@@ -397,6 +423,7 @@ Message: Placing a void expression inside another expression is forbidden.
397423[TestNoConfusingVoidExpression / invalid - 50 - 1 ]
398424Diagnostic 1 : invalidVoidExprArrow (3 :25 - 3 :37 )
399425Message : Returning a void expression from an arrow function shorthand is forbidden.
426+ Help: Add braces to the arrow function .
400427 2 | type Foo = () => any;
401428 3 | const test: Foo = () => console .log ();
402429 | ~~~~~~~~~~~~~
@@ -406,6 +433,7 @@ Message: Returning a void expression from an arrow function shorthand is forbidd
406433[TestNoConfusingVoidExpression / invalid - 51 - 1 ]
407434Diagnostic 1 : invalidVoidExprArrow (3 :25 - 3 :37 )
408435Message : Returning a void expression from an arrow function shorthand is forbidden.
436+ Help: Add braces to the arrow function .
409437 2 | type Foo = () => unknown;
410438 3 | const test: Foo = () => console .log ();
411439 | ~~~~~~~~~~~~~
@@ -460,6 +488,7 @@ Message: Returning a void expression from a function is forbidden. Please remove
460488[TestNoConfusingVoidExpression / invalid - 6 - 1 ]
461489Diagnostic 1 : invalidVoidExpr (2 :9 - 2 :26 )
462490Message : Placing a void expression inside another expression is forbidden .
491+ Help : Move it to its own statement instead .
463492 1 |
464493 2 | console .log (' foo' ) ? true : false ;
465494 | ~~~~~~~~~~~~~~~~~~
@@ -469,6 +498,7 @@ Message: Placing a void expression inside another expression is forbidden.
469498[TestNoConfusingVoidExpression / invalid - 7 - 1 ]
470499Diagnostic 1 : invalidVoidExpr (2 :10 - 2 :27 )
471500Message : Placing a void expression inside another expression is forbidden .
501+ Help : Move it to its own statement instead .
472502 1 |
473503 2 | (console .log (' foo' ) && true ) || false ;
474504 | ~~~~~~~~~~~~~~~~~~
@@ -478,6 +508,7 @@ Message: Placing a void expression inside another expression is forbidden.
478508[TestNoConfusingVoidExpression / invalid - 8 - 1 ]
479509Diagnostic 1 : invalidVoidExpr (2 :18 - 2 :34 )
480510Message : Placing a void expression inside another expression is forbidden .
511+ Help : Move it to its own statement instead .
481512 1 |
482513 2 | (cond && console .log (' ok' )) || console .log (' error' );
483514 | ~~~~~~~~~~~~~~~~~
@@ -487,6 +518,7 @@ Message: Placing a void expression inside another expression is forbidden.
487518[TestNoConfusingVoidExpression / invalid - 9 - 1 ]
488519Diagnostic 1 : invalidVoidExpr (2 :10 - 2 :27 )
489520Message : Placing a void expression inside another expression is forbidden .
521+ Help : Move it to its own statement instead .
490522 1 |
491523 2 | ! console .log (' foo' );
492524 | ~~~~~~~~~~~~~~~~~~
0 commit comments