Back to Prettier

18615 2

changelog_unreleased/javascript/18615-2.md

3.9.0650 B
Original Source

Improve comment handling around empty call argument list (#18615 by @fisker)

<!-- prettier-ignore -->
jsx
// Input
call
// line comment
();
call(// line comment
);
call(
  // line comment
);

call
/* block comment */
();
call(/* block comment */
);
call(
  /* block comment */
);

// Prettier stable
call();
// line comment
call(); // line comment
call();
// line comment

call();
/* block comment */
call /* block comment */();
call();
/* block comment */

// Prettier main
call
// line comment
();
call(
  // line comment
);
call(
  // line comment
);

call
/* block comment */
();
call(/* block comment */);
call(/* block comment */);