Fix ternary format in function call (#4368)
* Fix ternary format in fn call * Formatted to align with linter * Update jsfmt.spec.js.snap * Update jsfmt.spec.js.snap * test: remove obsolete snapshotmaster
parent
1790211f76
commit
d480858f01
|
@ -470,7 +470,8 @@ function printPathNoParens(path, options, print, args) {
|
|||
(n === parent.body && parent.type === "ArrowFunctionExpression") ||
|
||||
(n !== parent.body && parent.type === "ForStatement") ||
|
||||
(parent.type === "ConditionalExpression" &&
|
||||
parentParent.type !== "ReturnStatement");
|
||||
(parentParent.type !== "ReturnStatement" &&
|
||||
parentParent.type !== "CallExpression"));
|
||||
|
||||
const shouldIndentIfInlining =
|
||||
parent.type === "AssignmentExpression" ||
|
||||
|
|
|
@ -140,6 +140,90 @@ room = room.map((row, rowIndex) =>
|
|||
|
||||
`;
|
||||
|
||||
exports[`func-call.js - flow-verify 1`] = `
|
||||
fn(
|
||||
bifornCringerMoshedPerplexSawder,
|
||||
askTrovenaBeenaDependsRowans,
|
||||
glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl &&
|
||||
anodyneCondosMalateOverateRetinol
|
||||
? annularCooeedSplicesWalksWayWay
|
||||
: kochabCooieGameOnOboleUnweave
|
||||
);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
fn(
|
||||
bifornCringerMoshedPerplexSawder,
|
||||
askTrovenaBeenaDependsRowans,
|
||||
glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl &&
|
||||
anodyneCondosMalateOverateRetinol
|
||||
? annularCooeedSplicesWalksWayWay
|
||||
: kochabCooieGameOnOboleUnweave
|
||||
);
|
||||
|
||||
`;
|
||||
|
||||
exports[`func-call.js - flow-verify 2`] = `
|
||||
fn(
|
||||
bifornCringerMoshedPerplexSawder,
|
||||
askTrovenaBeenaDependsRowans,
|
||||
glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl &&
|
||||
anodyneCondosMalateOverateRetinol
|
||||
? annularCooeedSplicesWalksWayWay
|
||||
: kochabCooieGameOnOboleUnweave
|
||||
);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
fn(
|
||||
bifornCringerMoshedPerplexSawder,
|
||||
askTrovenaBeenaDependsRowans,
|
||||
glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl &&
|
||||
anodyneCondosMalateOverateRetinol
|
||||
? annularCooeedSplicesWalksWayWay
|
||||
: kochabCooieGameOnOboleUnweave
|
||||
);
|
||||
|
||||
`;
|
||||
|
||||
exports[`func-call.js - flow-verify 3`] = `
|
||||
fn(
|
||||
bifornCringerMoshedPerplexSawder,
|
||||
askTrovenaBeenaDependsRowans,
|
||||
glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl &&
|
||||
anodyneCondosMalateOverateRetinol
|
||||
? annularCooeedSplicesWalksWayWay
|
||||
: kochabCooieGameOnOboleUnweave
|
||||
);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
fn(
|
||||
bifornCringerMoshedPerplexSawder,
|
||||
askTrovenaBeenaDependsRowans,
|
||||
glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl &&
|
||||
anodyneCondosMalateOverateRetinol
|
||||
? annularCooeedSplicesWalksWayWay
|
||||
: kochabCooieGameOnOboleUnweave
|
||||
);
|
||||
|
||||
`;
|
||||
|
||||
exports[`func-call.js - flow-verify 4`] = `
|
||||
fn(
|
||||
bifornCringerMoshedPerplexSawder,
|
||||
askTrovenaBeenaDependsRowans,
|
||||
glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl &&
|
||||
anodyneCondosMalateOverateRetinol
|
||||
? annularCooeedSplicesWalksWayWay
|
||||
: kochabCooieGameOnOboleUnweave
|
||||
);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
fn(
|
||||
bifornCringerMoshedPerplexSawder,
|
||||
askTrovenaBeenaDependsRowans,
|
||||
glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl &&
|
||||
anodyneCondosMalateOverateRetinol
|
||||
? annularCooeedSplicesWalksWayWay
|
||||
: kochabCooieGameOnOboleUnweave
|
||||
);
|
||||
|
||||
`;
|
||||
|
||||
exports[`indent.js - flow-verify 1`] = `
|
||||
aaaaaaaaaaaaaaa ? bbbbbbbbbbbbbbbbbb : ccccccccccccccc ? ddddddddddddddd : eeeeeeeeeeeeeee ? fffffffffffffff : gggggggggggggggg
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
fn(
|
||||
bifornCringerMoshedPerplexSawder,
|
||||
askTrovenaBeenaDependsRowans,
|
||||
glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl &&
|
||||
anodyneCondosMalateOverateRetinol
|
||||
? annularCooeedSplicesWalksWayWay
|
||||
: kochabCooieGameOnOboleUnweave
|
||||
);
|
Loading…
Reference in New Issue