Back to Prettier

18630

changelog_unreleased/flow/18630.md

3.9.0447 B
Original Source

Fix dangling comment print in hooks (#18630 by @fisker)

<!-- prettier-ignore -->
flow
// Input
hook A(
  // comment  
) {}
declare hook B(// comment  
  ): void
type C = hook (// comment  
)=> void

// Prettier stable
hook A() // comment
{}
declare hook B(): // comment
void;
type C = hook () => // comment
void;

// Prettier main
hook A(
  // comment
) {}
declare hook B(
  // comment
): void;
type C = hook (
  // comment
) => void;