Fix space missing before , on import with bracket spacing off (#279)
Same fix as #278. We use the same (wrong) pattern in both places
This commit is contained in:
1 parent
b580a18f30
commit
92795a0fda
4 files changed
+68
-2
No files matched your search
+2
-2
@@ -454,7 +454,7 @@ function genericPrintNoParens(path, options, print) {
|
||||
|
||||
if (grouped.length > 0) {
|
||||
parts.push(
|
||||
group(
|
||||
multilineGroup(
|
||||
concat([
|
||||
"{",
|
||||
indent(
|
||||
@@ -462,7 +462,7 @@ function genericPrintNoParens(path, options, print) {
|
||||
concat([
|
||||
options.bracketSpacing ? line : softline,
|
||||
join(
|
||||
concat([ ",", options.bracketSpacing ? line : softline ]),
|
||||
concat([ ",", line ]),
|
||||
grouped
|
||||
)
|
||||
])
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
exports[`test brackets.js 1`] = `
|
||||
"import {
|
||||
runTaskForChanged,
|
||||
description,
|
||||
someOtherLabel,
|
||||
thatMakes,
|
||||
itGo,
|
||||
multiLine,
|
||||
andMore,
|
||||
soWeCanGetItTo80Columns
|
||||
} from \'.\';
|
||||
import {fitsIn, oneLine} from \'.\';
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
import {
|
||||
runTaskForChanged,
|
||||
description,
|
||||
someOtherLabel,
|
||||
thatMakes,
|
||||
itGo,
|
||||
multiLine,
|
||||
andMore,
|
||||
soWeCanGetItTo80Columns
|
||||
} from \".\";
|
||||
import { fitsIn, oneLine } from \".\";
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`test brackets.js 2`] = `
|
||||
"import {
|
||||
runTaskForChanged,
|
||||
description,
|
||||
someOtherLabel,
|
||||
thatMakes,
|
||||
itGo,
|
||||
multiLine,
|
||||
andMore,
|
||||
soWeCanGetItTo80Columns
|
||||
} from \'.\';
|
||||
import {fitsIn, oneLine} from \'.\';
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
import {
|
||||
runTaskForChanged,
|
||||
description,
|
||||
someOtherLabel,
|
||||
thatMakes,
|
||||
itGo,
|
||||
multiLine,
|
||||
andMore,
|
||||
soWeCanGetItTo80Columns
|
||||
} from \".\";
|
||||
import { fitsIn, oneLine } from \".\";
|
||||
"
|
||||
`;
|
||||
@@ -0,0 +1,11 @@
|
||||
import {
|
||||
runTaskForChanged,
|
||||
description,
|
||||
someOtherLabel,
|
||||
thatMakes,
|
||||
itGo,
|
||||
multiLine,
|
||||
andMore,
|
||||
soWeCanGetItTo80Columns
|
||||
} from '.';
|
||||
import {fitsIn, oneLine} from '.';
|
||||
@@ -0,0 +1,2 @@
|
||||
run_spec(__dirname);
|
||||
run_spec(__dirname, {bracketsSpacing: false});
|
||||
Reference in new issue
Block a user