Use group instead of conditionalGroup
parent
1549936e68
commit
aab300844f
|
@ -1866,25 +1866,19 @@ function printExportDeclaration(path, options, print) {
|
|||
} else {
|
||||
parts.push(
|
||||
decl.exportKind === "type" ? "type " : "",
|
||||
conditionalGroup([
|
||||
concat([
|
||||
shouldPrintSpaces ? "{ " : "{",
|
||||
join(", ", path.map(print, "specifiers")),
|
||||
shouldPrintSpaces ? " }" : "}"
|
||||
]),
|
||||
concat([
|
||||
"{",
|
||||
indent(
|
||||
options.tabWidth,
|
||||
concat([
|
||||
hardline,
|
||||
join(concat([",", hardline]), path.map(print, "specifiers"))
|
||||
])
|
||||
),
|
||||
hardline,
|
||||
"}"
|
||||
])
|
||||
])
|
||||
group(concat([
|
||||
"{",
|
||||
indent(
|
||||
options.tabWidth,
|
||||
concat([
|
||||
options.bracketSpacing ? line : softline,
|
||||
join(concat([",", options.bracketSpacing ? line : softline]),
|
||||
path.map(print, "specifiers"))
|
||||
])
|
||||
),
|
||||
options.bracketSpacing ? line : softline,
|
||||
"}"
|
||||
]))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -352,15 +352,11 @@ declare export {
|
|||
* @flow
|
||||
*/
|
||||
|
||||
<<<<<<< bbe2524dab164d43febc1a8d549a76e26eb9d483
|
||||
declare export { numberValue1, numberValue2 as numberValue2_renamed } from \"ES6_ExportFrom_Source1\";
|
||||
"
|
||||
=======
|
||||
declare export {
|
||||
numberValue1,
|
||||
numberValue2 as numberValue2_renamed
|
||||
} from \"ES6_ExportFrom_Source1\";"
|
||||
>>>>>>> Break long `exports` into multiple lines.
|
||||
} from \"ES6_ExportFrom_Source1\";
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`test ES6_ExportFrom_Intermediary2.js 1`] = `
|
||||
|
@ -379,15 +375,11 @@ declare export {
|
|||
* @flow
|
||||
*/
|
||||
|
||||
<<<<<<< bbe2524dab164d43febc1a8d549a76e26eb9d483
|
||||
declare export { numberValue1, numberValue2 as numberValue2_renamed2 } from \"ES6_ExportFrom_Source2\";
|
||||
"
|
||||
=======
|
||||
declare export {
|
||||
numberValue1,
|
||||
numberValue2 as numberValue2_renamed2
|
||||
} from \"ES6_ExportFrom_Source2\";"
|
||||
>>>>>>> Break long `exports` into multiple lines.
|
||||
} from \"ES6_ExportFrom_Source2\";
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`test ES6_ExportFrom_Source1.js 1`] = `
|
||||
|
|
|
@ -429,15 +429,11 @@ export {
|
|||
* @flow
|
||||
*/
|
||||
|
||||
<<<<<<< bbe2524dab164d43febc1a8d549a76e26eb9d483
|
||||
export { numberValue1, numberValue2 as numberValue2_renamed } from \"ES6_ExportFrom_Source1\";
|
||||
"
|
||||
=======
|
||||
export {
|
||||
numberValue1,
|
||||
numberValue2 as numberValue2_renamed
|
||||
} from \"ES6_ExportFrom_Source1\";"
|
||||
>>>>>>> Break long `exports` into multiple lines.
|
||||
} from \"ES6_ExportFrom_Source1\";
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`test ES6_ExportFrom_Intermediary2.js 1`] = `
|
||||
|
@ -456,15 +452,11 @@ export {
|
|||
* @flow
|
||||
*/
|
||||
|
||||
<<<<<<< bbe2524dab164d43febc1a8d549a76e26eb9d483
|
||||
export { numberValue1, numberValue2 as numberValue2_renamed2 } from \"ES6_ExportFrom_Source2\";
|
||||
"
|
||||
=======
|
||||
export {
|
||||
numberValue1,
|
||||
numberValue2 as numberValue2_renamed2
|
||||
} from \"ES6_ExportFrom_Source2\";"
|
||||
>>>>>>> Break long `exports` into multiple lines.
|
||||
} from \"ES6_ExportFrom_Source2\";
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`test ES6_ExportFrom_Source1.js 1`] = `
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<<<<<<< bbe2524dab164d43febc1a8d549a76e26eb9d483
|
||||
exports[`test directives.js 1`] = `
|
||||
"\"use strict\";
|
||||
|
||||
|
@ -12,7 +11,8 @@ function fn() {
|
|||
\"use strict\";
|
||||
}
|
||||
"
|
||||
=======
|
||||
`;
|
||||
|
||||
exports[`test exports.js 1`] = `
|
||||
"export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from \"exports\";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -22,8 +22,8 @@ export {
|
|||
value3,
|
||||
value4 as value4_renamed,
|
||||
value5
|
||||
} from \"exports\";"
|
||||
>>>>>>> Break long `exports` into multiple lines.
|
||||
} from \"exports\";
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`test optional-type-name.js 1`] = `
|
||||
|
|
Loading…
Reference in New Issue