@@ -257,48 +257,71 @@ var a = b /*eslint-disable-line no-undef*/`,
257
257
{
258
258
code : `/*eslint no-undef:off, no-unused-vars:off*/
259
259
var a = b //eslint-disable-line no-undef,no-unused-vars` ,
260
- errors : [
261
- {
262
- message :
263
- "'no-undef' rule is disabled but never reported." ,
264
- line : 2 ,
265
- column : 33 ,
266
- endLine : 2 ,
267
- endColumn : 41 ,
268
- suggestions : [ ] ,
269
- } ,
270
- {
271
- message :
272
- "'no-unused-vars' rule is disabled but never reported." ,
273
- line : 2 ,
274
- column : 42 ,
275
- endLine : 2 ,
276
- endColumn : 56 ,
277
- suggestions : [ ] ,
278
- } ,
279
- ] ,
260
+ errors : semver . satisfies ( Linter . version , ">=8.0.0" )
261
+ ? [
262
+ {
263
+ message :
264
+ "'no-undef' rule is disabled but never reported." ,
265
+ line : 2 ,
266
+ column : 33 ,
267
+ endLine : 2 ,
268
+ endColumn : 41 ,
269
+ suggestions : [ ] ,
270
+ } ,
271
+ ]
272
+ : [
273
+ {
274
+ message :
275
+ "'no-undef' rule is disabled but never reported." ,
276
+ line : 2 ,
277
+ column : 33 ,
278
+ endLine : 2 ,
279
+ endColumn : 41 ,
280
+ suggestions : [ ] ,
281
+ } ,
282
+ {
283
+ message :
284
+ "'no-unused-vars' rule is disabled but never reported." ,
285
+ line : 2 ,
286
+ column : 42 ,
287
+ endLine : 2 ,
288
+ endColumn : 56 ,
289
+ suggestions : [ ] ,
290
+ } ,
291
+ ] ,
280
292
} ,
281
293
{
282
294
code : `/*eslint no-undef:off, no-unused-vars:off*/
283
295
var a = b /*eslint-disable-line no-undef,no-unused-vars*/` ,
284
- errors : [
285
- {
286
- message :
287
- "'no-undef' rule is disabled but never reported." ,
288
- line : 2 ,
289
- column : 33 ,
290
- endLine : 2 ,
291
- endColumn : 41 ,
292
- } ,
293
- {
294
- message :
295
- "'no-unused-vars' rule is disabled but never reported." ,
296
- line : 2 ,
297
- column : 42 ,
298
- endLine : 2 ,
299
- endColumn : 56 ,
300
- } ,
301
- ] ,
296
+ errors : semver . satisfies ( Linter . version , ">=8.0.0" )
297
+ ? [
298
+ {
299
+ message :
300
+ "'no-undef' rule is disabled but never reported." ,
301
+ line : 2 ,
302
+ column : 33 ,
303
+ endLine : 2 ,
304
+ endColumn : 41 ,
305
+ } ,
306
+ ]
307
+ : [
308
+ {
309
+ message :
310
+ "'no-undef' rule is disabled but never reported." ,
311
+ line : 2 ,
312
+ column : 33 ,
313
+ endLine : 2 ,
314
+ endColumn : 41 ,
315
+ } ,
316
+ {
317
+ message :
318
+ "'no-unused-vars' rule is disabled but never reported." ,
319
+ line : 2 ,
320
+ column : 42 ,
321
+ endLine : 2 ,
322
+ endColumn : 56 ,
323
+ } ,
324
+ ] ,
302
325
} ,
303
326
{
304
327
code : `/*eslint no-undef:off*/
@@ -382,49 +405,72 @@ var a = b`,
382
405
code : `/*eslint no-undef:off, no-unused-vars:off*/
383
406
//eslint-disable-next-line no-undef,no-unused-vars
384
407
var a = b` ,
385
- errors : [
386
- {
387
- message :
388
- "'no-undef' rule is disabled but never reported." ,
389
- line : 2 ,
390
- column : 28 ,
391
- endLine : 2 ,
392
- endColumn : 36 ,
393
- suggestions : [ ] ,
394
- } ,
395
- {
396
- message :
397
- "'no-unused-vars' rule is disabled but never reported." ,
398
- line : 2 ,
399
- column : 37 ,
400
- endLine : 2 ,
401
- endColumn : 51 ,
402
- suggestions : [ ] ,
403
- } ,
404
- ] ,
408
+ errors : semver . satisfies ( Linter . version , ">=8.0.0" )
409
+ ? [
410
+ {
411
+ message :
412
+ "'no-undef' rule is disabled but never reported." ,
413
+ line : 2 ,
414
+ column : 28 ,
415
+ endLine : 2 ,
416
+ endColumn : 36 ,
417
+ suggestions : [ ] ,
418
+ } ,
419
+ ]
420
+ : [
421
+ {
422
+ message :
423
+ "'no-undef' rule is disabled but never reported." ,
424
+ line : 2 ,
425
+ column : 28 ,
426
+ endLine : 2 ,
427
+ endColumn : 36 ,
428
+ suggestions : [ ] ,
429
+ } ,
430
+ {
431
+ message :
432
+ "'no-unused-vars' rule is disabled but never reported." ,
433
+ line : 2 ,
434
+ column : 37 ,
435
+ endLine : 2 ,
436
+ endColumn : 51 ,
437
+ suggestions : [ ] ,
438
+ } ,
439
+ ] ,
405
440
} ,
406
441
{
407
442
code : `/*eslint no-undef:off, no-unused-vars:off*/
408
443
/*eslint-disable-next-line no-undef,no-unused-vars*/
409
444
var a = b` ,
410
- errors : [
411
- {
412
- message :
413
- "'no-undef' rule is disabled but never reported." ,
414
- line : 2 ,
415
- column : 28 ,
416
- endLine : 2 ,
417
- endColumn : 36 ,
418
- } ,
419
- {
420
- message :
421
- "'no-unused-vars' rule is disabled but never reported." ,
422
- line : 2 ,
423
- column : 37 ,
424
- endLine : 2 ,
425
- endColumn : 51 ,
426
- } ,
427
- ] ,
445
+ errors : semver . satisfies ( Linter . version , ">=8.0.0" )
446
+ ? [
447
+ {
448
+ message :
449
+ "'no-undef' rule is disabled but never reported." ,
450
+ line : 2 ,
451
+ column : 28 ,
452
+ endLine : 2 ,
453
+ endColumn : 36 ,
454
+ } ,
455
+ ]
456
+ : [
457
+ {
458
+ message :
459
+ "'no-undef' rule is disabled but never reported." ,
460
+ line : 2 ,
461
+ column : 28 ,
462
+ endLine : 2 ,
463
+ endColumn : 36 ,
464
+ } ,
465
+ {
466
+ message :
467
+ "'no-unused-vars' rule is disabled but never reported." ,
468
+ line : 2 ,
469
+ column : 37 ,
470
+ endLine : 2 ,
471
+ endColumn : 51 ,
472
+ } ,
473
+ ] ,
428
474
} ,
429
475
{
430
476
code : `/*eslint no-undef:off*/
@@ -478,26 +524,38 @@ var a = b`,
478
524
code : `/*eslint no-undef:off, no-unused-vars:off*/
479
525
/*eslint-disable no-undef,no-unused-vars*/
480
526
var a = b` ,
481
- errors : [
482
- {
483
- message :
484
- "'no-undef' rule is disabled but never reported." ,
485
- line : 2 ,
486
- column : 18 ,
487
- endLine : 2 ,
488
- endColumn : 26 ,
489
- suggestions : [ ] ,
490
- } ,
491
- {
492
- message :
493
- "'no-unused-vars' rule is disabled but never reported." ,
494
- line : 2 ,
495
- column : 27 ,
496
- endLine : 2 ,
497
- endColumn : 41 ,
498
- suggestions : [ ] ,
499
- } ,
500
- ] ,
527
+ errors : semver . satisfies ( Linter . version , ">=8.0.0" )
528
+ ? [
529
+ {
530
+ message :
531
+ "'no-undef' rule is disabled but never reported." ,
532
+ line : 2 ,
533
+ column : 18 ,
534
+ endLine : 2 ,
535
+ endColumn : 26 ,
536
+ suggestions : [ ] ,
537
+ } ,
538
+ ]
539
+ : [
540
+ {
541
+ message :
542
+ "'no-undef' rule is disabled but never reported." ,
543
+ line : 2 ,
544
+ column : 18 ,
545
+ endLine : 2 ,
546
+ endColumn : 26 ,
547
+ suggestions : [ ] ,
548
+ } ,
549
+ {
550
+ message :
551
+ "'no-unused-vars' rule is disabled but never reported." ,
552
+ line : 2 ,
553
+ column : 27 ,
554
+ endLine : 2 ,
555
+ endColumn : 41 ,
556
+ suggestions : [ ] ,
557
+ } ,
558
+ ] ,
501
559
} ,
502
560
{
503
561
code : `/*eslint no-undef:off*/
@@ -554,26 +612,38 @@ var a = b
554
612
/*eslint-disable no-undef,no-unused-vars*/
555
613
var a = b
556
614
/*eslint-enable*/` ,
557
- errors : [
558
- {
559
- message :
560
- "'no-undef' rule is disabled but never reported." ,
561
- line : 2 ,
562
- column : 18 ,
563
- endLine : 2 ,
564
- endColumn : 26 ,
565
- suggestions : [ ] ,
566
- } ,
567
- {
568
- message :
569
- "'no-unused-vars' rule is disabled but never reported." ,
570
- line : 2 ,
571
- column : 27 ,
572
- endLine : 2 ,
573
- endColumn : 41 ,
574
- suggestions : [ ] ,
575
- } ,
576
- ] ,
615
+ errors : semver . satisfies ( Linter . version , ">=8.0.0" )
616
+ ? [
617
+ {
618
+ message :
619
+ "'no-undef' rule is disabled but never reported." ,
620
+ line : 2 ,
621
+ column : 18 ,
622
+ endLine : 2 ,
623
+ endColumn : 26 ,
624
+ suggestions : [ ] ,
625
+ } ,
626
+ ]
627
+ : [
628
+ {
629
+ message :
630
+ "'no-undef' rule is disabled but never reported." ,
631
+ line : 2 ,
632
+ column : 18 ,
633
+ endLine : 2 ,
634
+ endColumn : 26 ,
635
+ suggestions : [ ] ,
636
+ } ,
637
+ {
638
+ message :
639
+ "'no-unused-vars' rule is disabled but never reported." ,
640
+ line : 2 ,
641
+ column : 27 ,
642
+ endLine : 2 ,
643
+ endColumn : 41 ,
644
+ suggestions : [ ] ,
645
+ } ,
646
+ ] ,
577
647
} ,
578
648
{
579
649
code : `/*eslint no-undef:error*/
0 commit comments