* Modify to align binaryish expression with trailing comment * Add tests * Add comment * Add test * Add changelog * Fix by lint * Modify to move transformation to printBinaryishExpressions * Remove unnecessary new line * Fix hasTrailingCommentInBinaryish * Add shouldReturnParts option to printComments * Add tests from review * Fix by lint * Extract and use normalizeParts * Group CallExpression when parent node is binaryish * Fix by lint * Remove unnecessary change * Wrap the doc of most left node with group * Add tests * Update pr-8476.md Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
339 B
339 B
Fix indentation for binary expressions with trailing comments (#8476 by @sosukesuzuki)
// Input
a +
a + // comment
a;
// Prettier stable
a +
a + // comment
a;
// Prettier master
a +
a + // comment
a;