Skip to content

[2.10.1] class keyword causes unwanted split #956

Closed

Description

@boris-petrov

Prettier-Java 2.10.1

Playground link

--print-width 40

Input:

var a = b
  ? c.c().c(A.class).c()
  : c.c().c(A.class).c();

Output:

var a = b
  ? c
      .c()
      .c(A.class)
      .c()
  : c
      .c()
      .c(A.class)
      .c();

Expected behavior:
Unchanged because Prettier for JS does that. Note that it's because of the class keyword. If you change it to something else, the output becomes correct.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions