@@ -386,14 +386,6 @@ tester.addFixturePatternConfig('javascript/modules', {
386
386
* Expected babel parse errors - ts-estree is not currently throwing
387
387
*/
388
388
'invalid-export-named-default' , // babel parse errors
389
-
390
- // babel does not recognise these as modules
391
- 'export-named-as-default' ,
392
- 'export-named-as-specifier' ,
393
- 'export-named-as-specifiers' ,
394
- 'export-named-specifier' ,
395
- 'export-named-specifiers-comma' ,
396
- 'export-named-specifiers' ,
397
389
/**
398
390
* TS 3.7 feature changes
399
391
* TODO: remove me when babel adds support
@@ -406,6 +398,13 @@ tester.addFixturePatternConfig('javascript/modules', {
406
398
// 'error-strict',
407
399
'error-delete' ,
408
400
'invalid-await' ,
401
+ // babel does not recognise these as modules
402
+ 'export-named-as-default' ,
403
+ 'export-named-as-specifier' ,
404
+ 'export-named-as-specifiers' ,
405
+ 'export-named-specifier' ,
406
+ 'export-named-specifiers-comma' ,
407
+ 'export-named-specifiers' ,
409
408
] ,
410
409
} ) ;
411
410
@@ -556,16 +555,6 @@ tester.addFixturePatternConfig('typescript/basics', {
556
555
*/
557
556
'directive-in-module' ,
558
557
'directive-in-namespace' ,
559
- /**
560
- * Babel parses this incorrectly
561
- * https://github.com/babel/babel/issues/9324
562
- */
563
- 'type-assertion-arrow-function' ,
564
- /**
565
- * PR for optional parameters in arrow function has been merged into Babel: https://github.com/babel/babel/pull/9463
566
- * TODO: remove me in next babel > 7.3.2
567
- */
568
- 'arrow-function-with-optional-parameter' ,
569
558
/**
570
559
* [BABEL ERRORED, BUT TS-ESTREE DID NOT]
571
560
*/
@@ -578,10 +567,11 @@ tester.addFixturePatternConfig('typescript/basics', {
578
567
*/
579
568
'abstract-class-with-abstract-constructor' ,
580
569
/**
581
- * TS 3.7 feature changes
582
- * TODO: remove me when babel adds support
570
+ * TS 3.7: optional chaining
571
+ * babel: sets optional property as true/undefined
572
+ * ts-estree: sets optional property as true/false
583
573
*/
584
- // optional chaining
574
+ 'arrow-function-with- optional-parameter' ,
585
575
'optional-chain' ,
586
576
'optional-chain-with-parens' ,
587
577
'optional-chain-call' ,
@@ -595,6 +585,10 @@ tester.addFixturePatternConfig('typescript/basics', {
595
585
'never-type-param' ,
596
586
'non-null-assertion-operator' ,
597
587
'type-parameters-comments' ,
588
+ /**
589
+ * TS 3.7 feature changes
590
+ * TODO: remove me when babel adds support
591
+ */
598
592
// type assertion function
599
593
'type-assertion-in-function' ,
600
594
'type-assertion-in-arrow-function' ,
@@ -638,10 +632,10 @@ tester.addFixturePatternConfig('typescript/decorators/accessor-decorators', {
638
632
fileType : 'ts' ,
639
633
ignore : [
640
634
/**
641
- * TS 3.7 feature changes
642
- * TODO: remove me when babel adds support
635
+ * TS 3.7: optional chaining
636
+ * babel: sets optional property as true/undefined
637
+ * ts-estree: sets optional property as true/false
643
638
*/
644
- // optional chaining
645
639
'accessor-decorator-factory-instance-member' ,
646
640
'accessor-decorator-factory-static-member' ,
647
641
'accessor-decorator-instance-member' ,
@@ -652,21 +646,21 @@ tester.addFixturePatternConfig('typescript/decorators/class-decorators', {
652
646
fileType : 'ts' ,
653
647
ignore : [
654
648
/**
655
- * TS 3.7 feature changes
656
- * TODO: remove me when babel adds support
649
+ * TS 3.7: optional chaining
650
+ * babel: sets optional property as true/undefined
651
+ * ts-estree: sets optional property as true/false
657
652
*/
658
- // optional chaining
659
653
'class-decorator-factory' ,
660
654
] ,
661
655
} ) ;
662
656
tester . addFixturePatternConfig ( 'typescript/decorators/method-decorators' , {
663
657
fileType : 'ts' ,
664
658
ignore : [
665
659
/**
666
- * TS 3.7 feature changes
667
- * TODO: remove me when babel adds support
660
+ * TS 3.7: optional chaining
661
+ * babel: sets optional property as true/undefined
662
+ * ts-estree: sets optional property as true/false
668
663
*/
669
- // optional chaining
670
664
'method-decorator-factory-instance-member' ,
671
665
'method-decorator-factory-static-member' ,
672
666
] ,
@@ -681,10 +675,10 @@ tester.addFixturePatternConfig('typescript/decorators/parameter-decorators', {
681
675
'parameter-array-pattern-decorator' ,
682
676
'parameter-rest-element-decorator' ,
683
677
/**
684
- * TS 3.7 feature changes
685
- * TODO: remove me when babel adds support
678
+ * TS 3.7: optional chaining
679
+ * babel: sets optional property as true/undefined
680
+ * ts-estree: sets optional property as true/false
686
681
*/
687
- // optional chaining
688
682
'parameter-decorator-constructor' ,
689
683
'parameter-decorator-decorator-instance-member' ,
690
684
'parameter-decorator-decorator-static-member' ,
@@ -695,13 +689,17 @@ tester.addFixturePatternConfig('typescript/decorators/property-decorators', {
695
689
fileType : 'ts' ,
696
690
ignore : [
697
691
/**
698
- * TS 3.7 feature changes
699
- * TODO: remove me when babel adds support
692
+ * TS 3.7: optional chaining
693
+ * babel: sets optional property as true/undefined
694
+ * ts-estree: sets optional property as true/false
700
695
*/
701
- // optional chaining
702
696
'property-decorator-factory-instance-member' ,
703
697
'property-decorator-factory-static-member' ,
704
- // declare class properties
698
+ /**
699
+ * TS 3.7: declare class properties
700
+ * babel: sets declare property as true/undefined
701
+ * ts-estree: sets declare property as true/false
702
+ */
705
703
'property-decorator-instance-member' ,
706
704
'property-decorator-static-member' ,
707
705
] ,
@@ -715,10 +713,9 @@ tester.addFixturePatternConfig('typescript/expressions', {
715
713
*/
716
714
'tagged-template-expression-type-arguments' ,
717
715
/**
718
- * TS 3.7 feature changes
719
- * TODO: remove me when babel adds support
716
+ * babel: sets optional property as true/undefined
717
+ * ts-estree: sets optional property as true/false
720
718
*/
721
- // optional chaining
722
719
'call-expression-type-arguments' ,
723
720
] ,
724
721
} ) ;
@@ -752,18 +749,10 @@ tester.addFixturePatternConfig('typescript/types', {
752
749
fileType : 'ts' ,
753
750
ignore : [
754
751
/**
755
- * AST difference
752
+ * TS 3.7: optional chaining
753
+ * babel: sets optional property as true/undefined
754
+ * ts-estree: sets optional property as true/false
756
755
*/
757
- 'literal-number-negative' ,
758
- /**
759
- * Babel parse error: https://github.com/babel/babel/pull/9431
760
- */
761
- 'function-with-array-destruction' ,
762
- /**
763
- * TS 3.7 feature changes
764
- * TODO: remove me when babel adds support
765
- */
766
- // optional chaining
767
756
'this-type-expanded' ,
768
757
] ,
769
758
} ) ;
0 commit comments