-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Open
Copy link
Labels
good first issueGood fist issue!Good fist issue!help wantedWe're a small group who can't get to every issue promptly. We’d appreciate help fixing this issue!We're a small group who can't get to every issue promptly. We’d appreciate help fixing this issue!lang:javascriptIssues affecting JSIssues affecting JS
Description
Prettier 3.6.2
Playground link
--parser babel-tsInput:
// ConditionalExpression
fn(
bifornCringerMoshedPerplexSawder,
askTrovenaBeenaDependsRowans,
glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl &&
anodyneCondosMalateOverateRetinol
? annularCooeedSplicesWalksWayWay
: kochabCooieGameOnOboleUnweave
);
new fn(
bifornCringerMoshedPerplexSawder,
askTrovenaBeenaDependsRowans,
glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl &&
anodyneCondosMalateOverateRetinol
? annularCooeedSplicesWalksWayWay
: kochabCooieGameOnOboleUnweave
);
// MemberExpression
TelemetryTrustedValue(
instance.capabilities.get(
TerminalCapability?.PromptTypeDetection
)?.promptType
)
new TelemetryTrustedValue(
instance.capabilities.get(
TerminalCapability?.PromptTypeDetection
)?.promptType
)Output:
// ConditionalExpression
fn(
bifornCringerMoshedPerplexSawder,
askTrovenaBeenaDependsRowans,
glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl &&
anodyneCondosMalateOverateRetinol
? annularCooeedSplicesWalksWayWay
: kochabCooieGameOnOboleUnweave,
);
new fn(
bifornCringerMoshedPerplexSawder,
askTrovenaBeenaDependsRowans,
glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl &&
anodyneCondosMalateOverateRetinol
? annularCooeedSplicesWalksWayWay
: kochabCooieGameOnOboleUnweave,
);
// MemberExpression
TelemetryTrustedValue(
instance.capabilities.get(TerminalCapability?.PromptTypeDetection)
?.promptType,
);
new TelemetryTrustedValue(
instance.capabilities.get(
TerminalCapability?.PromptTypeDetection,
)?.promptType,
);Expected output:
// ConditionalExpression
fn(
bifornCringerMoshedPerplexSawder,
askTrovenaBeenaDependsRowans,
glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl &&
anodyneCondosMalateOverateRetinol
? annularCooeedSplicesWalksWayWay
: kochabCooieGameOnOboleUnweave,
);
new fn(
bifornCringerMoshedPerplexSawder,
askTrovenaBeenaDependsRowans,
glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl &&
anodyneCondosMalateOverateRetinol
? annularCooeedSplicesWalksWayWay
: kochabCooieGameOnOboleUnweave,
);
// MemberExpression
TelemetryTrustedValue(
instance.capabilities.get(
TerminalCapability?.PromptTypeDetection,
)?.promptType,
);
new TelemetryTrustedValue(
instance.capabilities.get(
TerminalCapability?.PromptTypeDetection,
)?.promptType,
);Why?
There is no reason why we need the output to be different in CallExpression and NewExpression. Keep the same formatting, which also improves readability.
Metadata
Metadata
Assignees
Labels
good first issueGood fist issue!Good fist issue!help wantedWe're a small group who can't get to every issue promptly. We’d appreciate help fixing this issue!We're a small group who can't get to every issue promptly. We’d appreciate help fixing this issue!lang:javascriptIssues affecting JSIssues affecting JS