Fix missing semi when default exporting CallExpression (#287)
parent
b94b86331f
commit
083876e66d
|
@ -1843,7 +1843,8 @@ function printExportDeclaration(path, options, print) {
|
|||
|
||||
if (
|
||||
decl.type === "ExportDefaultDeclaration" &&
|
||||
decl.declaration.type == "Identifier"
|
||||
(decl.declaration.type == "Identifier" ||
|
||||
decl.declaration.type === "CallExpression")
|
||||
) {
|
||||
parts.push(";");
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ new (() => {});
|
|||
typeof (() => {
|
||||
});
|
||||
export default (() => {
|
||||
})()
|
||||
})();
|
||||
(() => {
|
||||
})()\`\`;
|
||||
(() => {
|
||||
|
|
|
@ -1347,6 +1347,13 @@ import {
|
|||
"
|
||||
`;
|
||||
|
||||
exports[`test export_default_call_expression.js 1`] = `
|
||||
"export default connect(mapStateToProps)(MyComponent);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
export default connect(mapStateToProps)(MyComponent);
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`test test_imports_are_frozen.js 1`] = `
|
||||
"/* @flow */
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
export default connect(mapStateToProps)(MyComponent);
|
|
@ -376,7 +376,7 @@ new (function() {});
|
|||
typeof (function() {
|
||||
});
|
||||
export default (function() {
|
||||
})()
|
||||
})();
|
||||
(function() {
|
||||
})()\`\`;
|
||||
(function() {
|
||||
|
|
Loading…
Reference in New Issue