Skip to content

Improve Flow enums comments formatting #6857

@gkz

Description

@gkz

I need to fix the formatting of comments in Flow enums (added in #6833). Not sure why it isn't working as expected.

Prettier /next/
Playground link

Input:

enum E {
  A = 0,
  // B = 1,
  C = 2
}

Output:

enum E {
// B = 1,
  A = 0,
  C = 2
}

Expected behavior:

enum E {
  A = 0,
  // B = 1,
  C = 2
}

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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions