This nice-ish code:
const areaPercentageDiff = (
topRankedZoneFit.areaPercentageRemaining
- previousZoneFitNow.areaPercentageRemaining
).toFixed(2)
gets formatted into uglier code:
const areaPercentageDiff = (topRankedZoneFit.areaPercentageRemaining -
previousZoneFitNow.areaPercentageRemaining).toFixed(2);
It doesn't respect print width either.
FTR this is now printing:
const areaPercentageDiff = (topRankedZoneFit.areaPercentageRemaining -
previousZoneFitNow.areaPercentageRemaining
).toFixed(2);
Related to #2775. This matches the logical expression case:
const foo = (bar &&
baz
).call()
This now prints as:
Prettier 1.9.1
Playground link
Input:
const areaPercentageDiff = (
topRankedZoneFit.areaPercentageRemaining
- previousZoneFitNow.areaPercentageRemaining
).toFixed(2)
Output:
const areaPercentageDiff = (
topRankedZoneFit.areaPercentageRemaining -
previousZoneFitNow.areaPercentageRemaining
).toFixed(2);
Which is pretty similar to the input, except for where the -
sign stays (end of line / start of next line) but I guess the primary issue was fixed.. if anyone dislikes the -
placement, please open a new issue :-)
Most helpful comment
This now prints as:
Prettier 1.9.1
Playground link
Input:
Output:
Which is pretty similar to the input, except for where the
-
sign stays (end of line / start of next line) but I guess the primary issue was fixed.. if anyone dislikes the-
placement, please open a new issue :-)