Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
fix(typescript-estree): wrap import = declaration in an export node#5885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
7a25528
0414e4d
04488c2
ee2fbfa
c446386
cf2956f
b90e7c3
fff0e29
a027cec
3d85274
51d97ae
16a5cfb
74839f9
8dd2a42
58c4d34
b36507f
dd858f6
28863a4
b331c98
a128343
c60da02
d2d052d
c7ea8eb
a738b91
79a5f81
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -17,7 +17,6 @@ Program { | ||
}, | ||
}, | ||
importKind: "value", | ||
JoshuaKGoldberg marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
moduleReference: TSQualifiedName { | ||
type: "TSQualifiedName", | ||
left: TSQualifiedName { | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -2,5 +2,88 @@ | ||
exports[`AST Fixtures declaration TSImportEqualsDeclaration entity-name-many AST Alignment - AST 1`] = ` | ||
"Snapshot Diff: | ||
- TSESTree | ||
+ Babel | ||
Program { | ||
type: 'Program', | ||
body: Array [ | ||
TSImportEqualsDeclaration { | ||
type: 'TSImportEqualsDeclaration', | ||
id: Identifier { | ||
type: 'Identifier', | ||
name: 'F', | ||
range: [7, 8], | ||
loc: { | ||
start: { column: 7, line: 1 }, | ||
end: { column: 8, line: 1 }, | ||
}, | ||
}, | ||
importKind: 'value', | ||
+ isExport: false, | ||
JoshuaKGoldberg marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
moduleReference: TSQualifiedName { | ||
type: 'TSQualifiedName', | ||
left: TSQualifiedName { | ||
type: 'TSQualifiedName', | ||
left: Identifier { | ||
type: 'Identifier', | ||
name: 'A', | ||
range: [11, 12], | ||
loc: { | ||
start: { column: 11, line: 1 }, | ||
end: { column: 12, line: 1 }, | ||
}, | ||
}, | ||
right: Identifier { | ||
type: 'Identifier', | ||
name: 'B', | ||
range: [13, 14], | ||
loc: { | ||
start: { column: 13, line: 1 }, | ||
end: { column: 14, line: 1 }, | ||
}, | ||
}, | ||
range: [11, 14], | ||
loc: { | ||
start: { column: 11, line: 1 }, | ||
end: { column: 14, line: 1 }, | ||
}, | ||
}, | ||
right: Identifier { | ||
type: 'Identifier', | ||
name: 'C', | ||
range: [15, 16], | ||
loc: { | ||
start: { column: 15, line: 1 }, | ||
end: { column: 16, line: 1 }, | ||
}, | ||
}, | ||
range: [11, 16], | ||
loc: { | ||
start: { column: 11, line: 1 }, | ||
end: { column: 16, line: 1 }, | ||
}, | ||
}, | ||
range: [0, 17], | ||
loc: { | ||
start: { column: 0, line: 1 }, | ||
end: { column: 17, line: 1 }, | ||
}, | ||
}, | ||
], | ||
sourceType: 'script', | ||
range: [0, 18], | ||
loc: { | ||
start: { column: 0, line: 1 }, | ||
end: { column: 0, line: 2 }, | ||
}, | ||
}" | ||
`; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -17,7 +17,6 @@ Program { | ||
}, | ||
}, | ||
importKind: "value", | ||
moduleReference: Identifier { | ||
type: "Identifier", | ||
name: "A", | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -371,6 +371,16 @@ tester.addFixturePatternConfig('typescript/basics', { | ||
'class-with-two-methods-computed-constructor', | ||
'export-type-star-from', | ||
'import-type-error', | ||
/** | ||
* Babel's 'typescript' transform gives these TypeScript-like properties | ||
* such as `isExport: false`, but we don't include those in our AST. | ||
*/ | ||
'import-equal-declaration', | ||
'import-export-equal-declaration', | ||
'import-equal-type-declaration', | ||
'import-export-equal-type-declaration', | ||
bradzacher marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
/** | ||
* [TS-ESTREE ERRORED, BUT BABEL DID NOT] | ||
* This is intentional; babel is not checking types | ||
@@ -404,10 +414,6 @@ tester.addFixturePatternConfig('typescript/basics', { | ||
* @see https://github.com/babel/babel/issues/9213 | ||
*/ | ||
'export-assignment', | ||
// babel treats declare and types as not a module | ||
'export-declare-const-named-enum', | ||
'export-declare-named-enum', | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -23,7 +23,6 @@ Object { | ||
"type": "Identifier", | ||
}, | ||
"importKind": "value", | ||
"loc": Object { | ||
"end": Object { | ||
"column": 28, | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -23,7 +23,6 @@ Object { | ||
"type": "Identifier", | ||
}, | ||
"importKind": "type", | ||
"loc": Object { | ||
"end": Object { | ||
"column": 33, | ||
Uh oh!
There was an error while loading.Please reload this page.