@@ -33,7 +33,7 @@ const jsxFilesWithKnownIssues = jsxKnownIssues.map(f => f.replace('jsx/', ''));
33
33
* TSEP - SyntaxError
34
34
* Babylon - RangeError
35
35
*
36
- * Reported here: https://github.com/babel/babylon /issues/674
36
+ * Reported here: https://github.com/babel/babel /issues/6680
37
37
*/
38
38
jsxFilesWithKnownIssues . push ( 'invalid-no-tag-name' ) ;
39
39
@@ -66,7 +66,7 @@ function createFixturePatternConfigFor(
66
66
config . parseWithSourceTypeModule = config . parseWithSourceTypeModule || [ ] ;
67
67
/**
68
68
* The TypeScript compiler gives us the "externalModuleIndicator" to allow typescript-estree do dynamically detect the "sourceType".
69
- * Babylon does not have an equivalent feature (although perhaps it might come in the future https://github.com/babel/babylon /issues/440 ),
69
+ * Babylon does not have an equivalent feature (although perhaps it might come in the future https://github.com/babel/babel /issues/6695 ),
70
70
* so we have to specify the "sourceType" we want to use.
71
71
*
72
72
* By default we have configured babylon to use "script", but for any fixtures specified in the parseWithSourceTypeModule array we need "module".
@@ -106,14 +106,14 @@ let fixturePatternConfigsToTest = [
106
106
107
107
createFixturePatternConfigFor ( 'comments' , {
108
108
ignore : [
109
- 'export-default-anonymous-class' , // needs to be parsed with `sourceType: "module"`
110
109
/**
111
110
* Template strings seem to also be affected by the difference in opinion between different parsers in:
112
- * https://github.com/babel/babylon /issues/673
111
+ * https://github.com/babel/babel /issues/6681
113
112
*/
114
113
'no-comment-template' , // Purely AST diffs
115
114
'template-string-block' // Purely AST diffs
116
- ]
115
+ ] ,
116
+ parseWithSourceTypeModule : [ 'export-default-anonymous-class' ]
117
117
} ) ,
118
118
119
119
createFixturePatternConfigFor ( 'javascript/templateStrings' , {
@@ -211,10 +211,6 @@ let fixturePatternConfigsToTest = [
211
211
212
212
createFixturePatternConfigFor ( 'javascript/modules' , {
213
213
ignore : [
214
- /**
215
- * TypeScript, flow and babylon parse this fine - esprima, espree and acorn do not...
216
- */
217
- 'invalid-export-default' , // typescript-estree parse errors
218
214
/**
219
215
* Expected babylon parse errors - all of these files below produce parse errors in espree
220
216
* as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree
@@ -339,15 +335,12 @@ let fixturePatternConfigsToTest = [
339
335
createFixturePatternConfigFor ( 'tsx' , {
340
336
fileType : 'tsx' ,
341
337
ignore : [
342
- /**
343
- * AST difference
344
- */
345
- 'react-typed-props' ,
346
338
/**
347
339
* currently babylon not supported
348
340
*/
349
341
'generic-jsx-element'
350
- ]
342
+ ] ,
343
+ parseWithSourceTypeModule : [ 'react-typed-props' ]
351
344
} ) ,
352
345
353
346
/* ================================================== */
@@ -425,7 +418,7 @@ let fixturePatternConfigsToTest = [
425
418
'abstract-class-with-optional-method' , // babylon parse errors
426
419
'declare-class-with-optional-method' , // babylon parse errors
427
420
/**
428
- * Awaiting feedback on Babylon issue https://github.com/babel/babylon /issues/700
421
+ * Awaiting feedback on Babylon issue https://github.com/babel/babel /issues/6679
429
422
*/
430
423
'class-with-private-parameter-properties' ,
431
424
'class-with-protected-parameter-properties' ,
@@ -499,14 +492,14 @@ let fixturePatternConfigsToTest = [
499
492
ignore : [
500
493
/**
501
494
* AST difference
502
- * tsep: TSAbstractClassDeclaration
503
- * babel: ClassDeclaration[abstract=true]
495
+ * tsep: heritage = []
496
+ * babel: heritage = undefined
504
497
*/
505
498
'interface' ,
506
499
/**
507
500
* AST difference
508
- * tsep: heritage = []
509
- * babel: heritage = undefined
501
+ * tsep: TSAbstractClassDeclaration
502
+ * babel: ClassDeclaration[abstract=true]
510
503
*/
511
504
'abstract-class'
512
505
]
0 commit comments