Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flow comments in function arguments moved to body #5403

Closed
zaygraveyard opened this issue Nov 8, 2018 · 1 comment
Closed

Flow comments in function arguments moved to body #5403

zaygraveyard opened this issue Nov 8, 2018 · 1 comment
Labels
area:comments Issues with how Prettier prints comments lang:flow Issues affecting Flow-specific constructs (not general JS issues) locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. status:has pr Issues with an accompanying pull request. These issues will probably be fixed soon! type:bug Issues identifying ugly output, or a defect in the program
Milestone

Comments

@zaygraveyard
Copy link

Prettier 1.15.1
Playground link

--parser babylon

Input:

export function updateStoreFromURL(
  store /*: Store*/,
  {search, hash} /*: {search: string, hash: string}*/
) {}

Output:

export function updateStoreFromURL(store /*: Store*/, { search, hash }) {
  /*: {search: string, hash: string}*/
}

Expected behavior:

Input is unchanged, more specifically the flow type comment should not move into the body of the function

@j-f1 j-f1 added area:comments Issues with how Prettier prints comments help wanted We're a small group who can't get to every issue promptly. We’d appreciate help fixing this issue! lang:flow Issues affecting Flow-specific constructs (not general JS issues) type:bug Issues identifying ugly output, or a defect in the program labels Nov 8, 2018
@ikatyang ikatyang added status:has pr Issues with an accompanying pull request. These issues will probably be fixed soon! and removed help wanted We're a small group who can't get to every issue promptly. We’d appreciate help fixing this issue! labels Nov 10, 2018
@ikatyang ikatyang added this to the 1.15.2 milestone Nov 10, 2018
@ikatyang
Copy link
Member

The fix is available in 1.15.2.

@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Feb 8, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Feb 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area:comments Issues with how Prettier prints comments lang:flow Issues affecting Flow-specific constructs (not general JS issues) locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. status:has pr Issues with an accompanying pull request. These issues will probably be fixed soon! type:bug Issues identifying ugly output, or a defect in the program
Projects
None yet
Development

No branches or pull requests

3 participants