Add semicolon to more default exports (#343)
parent
658998c5b1
commit
a8ca2b21f4
|
@ -1823,9 +1823,9 @@ function printExportDeclaration(path, options, print) {
|
|||
|
||||
if (
|
||||
decl.type === "ExportDefaultDeclaration" &&
|
||||
(decl.declaration.type == "Identifier" ||
|
||||
decl.declaration.type === "CallExpression" ||
|
||||
typeIsFunction(decl.declaration.type))
|
||||
(decl.declaration.type !== "ClassDeclaration" &&
|
||||
decl.declaration.type !== "FunctionDeclaration" &&
|
||||
decl.declaration.type !== "FunctionExpression")
|
||||
) {
|
||||
parts.push(";");
|
||||
}
|
||||
|
|
|
@ -324,7 +324,7 @@ export var str = \'asdf\';
|
|||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
/* @flow */
|
||||
|
||||
export default 42
|
||||
export default 42;
|
||||
export var str = \"asdf\";
|
||||
"
|
||||
`;
|
||||
|
@ -1366,7 +1366,7 @@ exports[`test export_default_function_expression.js 1`] = `
|
|||
"export default (function() {});
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
export default function() {
|
||||
};
|
||||
}
|
||||
"
|
||||
`;
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ export default 42;
|
|||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
/* @flow */
|
||||
|
||||
export default 42
|
||||
export default 42;
|
||||
"
|
||||
`;
|
||||
|
||||
|
|
Loading…
Reference in New Issue