Skip to content

Flow comments in function arguments moved to body #5403

@ziadkh0

Description

@ziadkh0

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:commentsIssues with how Prettier prints commentslang:flowIssues affecting Flow-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.status:has prIssues with an accompanying pull request. These issues will probably be fixed soon!

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions