#### 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;
```
