1
- import jsxKnownIssues from '@typescript-eslint/shared-fixtures/dist/jsx-known-issues' ;
2
1
import fs from 'fs' ;
3
2
import glob from 'glob' ;
4
3
import path from 'path' ;
@@ -109,20 +108,6 @@ class FixturesTester {
109
108
*/
110
109
const tester = new FixturesTester ( ) ;
111
110
112
- /**
113
- * JSX fixtures which have known issues for typescript-estree
114
- */
115
- const jsxFilesWithKnownIssues = jsxKnownIssues . map ( f => f . replace ( 'jsx/' , '' ) ) ;
116
-
117
- /**
118
- * Current random error difference on jsx/invalid-no-tag-name.src.js
119
- * ts-estree - SyntaxError
120
- * Babel - RangeError
121
- *
122
- * Reported here: https://github.com/babel/babel/issues/6680
123
- */
124
- jsxFilesWithKnownIssues . push ( 'invalid-no-tag-name' ) ;
125
-
126
111
tester . addFixturePatternConfig ( 'javascript/basics' ) ;
127
112
128
113
tester . addFixturePatternConfig ( 'comments' ) ;
@@ -166,8 +151,8 @@ tester.addFixturePatternConfig('javascript/arrowFunctions', {
166
151
* TS1100: "Invalid use of '{0}' in strict mode."
167
152
* TODO: do we want TS1100 error code?
168
153
*/
169
- 'error-strict-eval' , // babel parse errors
170
154
'error-strict-default-param-eval' ,
155
+ 'error-strict-eval' ,
171
156
'error-strict-eval-return' ,
172
157
'error-strict-param-arguments' ,
173
158
'error-strict-param-eval' ,
@@ -308,7 +293,30 @@ tester.addFixturePatternConfig('javascript/unicodeCodePointEscapes');
308
293
/* ================================================== */
309
294
310
295
tester . addFixturePatternConfig ( 'jsx' , {
311
- ignore : jsxFilesWithKnownIssues ,
296
+ ignore : [
297
+ /**
298
+ * JSX fixtures which have known issues for typescript-estree
299
+ * https://github.com/Microsoft/TypeScript/issues/7410
300
+ */
301
+ 'embedded-tags' ,
302
+ /**
303
+ * JSX fixtures which have known issues for typescript-estree
304
+ * @see https://github.com/Microsoft/TypeScript/issues/7411
305
+ */
306
+ 'namespaced-attribute-and-value-inserted' ,
307
+ /**
308
+ * JSX fixtures which have known issues for typescript-estree
309
+ * @see https://github.com/Microsoft/TypeScript/issues/7411
310
+ */
311
+ 'namespaced-name-and-attribute' ,
312
+ /**
313
+ * Current random error difference on jsx/invalid-no-tag-name.src.js
314
+ * ts-estree - SyntaxError
315
+ * Babel - RangeError
316
+ * @see https://github.com/babel/babel/issues/6680
317
+ */
318
+ 'invalid-no-tag-name' ,
319
+ ] ,
312
320
} ) ;
313
321
tester . addFixturePatternConfig ( 'jsx-useJSXTextNode' ) ;
314
322
@@ -342,13 +350,14 @@ tester.addFixturePatternConfig('typescript/basics', {
342
350
*/
343
351
'interface-with-extends-member-expression' ,
344
352
/**
345
- * https://github.com/typescript-eslint/typescript-eslint/issues/2998
353
+ * @see https://github.com/typescript-eslint/typescript-eslint/issues/2998
346
354
*/
347
355
'type-import-type' ,
348
356
'type-import-type-with-type-parameters-in-type-reference' ,
349
357
/**
350
- * Not yet supported in Babel https://github.com/babel/babel/issues/9228
358
+ * Not yet supported in Babel
351
359
* Directive field is not added to module and namespace
360
+ * @see https://github.com/babel/babel/issues/9228
352
361
*/
353
362
'directive-in-module' ,
354
363
'directive-in-namespace' ,
@@ -368,12 +377,6 @@ tester.addFixturePatternConfig('typescript/basics', {
368
377
* https://github.com/babel/babel/issues/12683
369
378
*/
370
379
'export-named-enum-computed-string' ,
371
- /**
372
- * Babel: TSTypePredicate does not include `asserts` statement in range
373
- * ts-estree: TSTypePredicate does include `asserts` statement in range
374
- * https://github.com/babel/babel/pull/12763
375
- */
376
- 'type-assertion-with-guard-in-method' ,
377
380
/**
378
381
* [BABEL ERRORED, BUT TS-ESTREE DID NOT]
379
382
* This is intentional; we don't error on semantic problems for these cases
@@ -387,16 +390,11 @@ tester.addFixturePatternConfig('typescript/basics', {
387
390
* TODO: report this to babel
388
391
*/
389
392
'catch-clause-with-invalid-annotation' ,
390
- /**
391
- * babel does not take into account leading character into union and intersection
392
- * https://github.com/babel/babel/pull/12758
393
- */
394
- 'union-intersection' ,
395
393
] ,
396
394
ignoreSourceType : [
397
395
/**
398
396
* Babel reports sourceType script
399
- * https://github.com/babel/babel/issues/9213
397
+ * @see https://github.com/babel/babel/issues/9213
400
398
*/
401
399
'export-assignment' ,
402
400
'import-equal-declaration' ,
@@ -493,6 +491,4 @@ tester.addFixturePatternConfig('typescript/namespaces-and-modules', {
493
491
] ,
494
492
} ) ;
495
493
496
- const fixturesToTest = tester . getFixtures ( ) ;
497
-
498
- export { fixturesToTest } ;
494
+ export const fixturesToTest = tester . getFixtures ( ) ;
0 commit comments