Skip to content

[2.7.0] GraphQL: empty lines inside comments unexpectedly removed #13011

@jlowcs

Description

@jlowcs

Prettier 2.7.0
Playground link

Input:

const typeDefs = gql`
  type User {
    """
    First line

    Second Line
    """
    value: String
  }
`

Output:

const typeDefs = gql`
  type User {
    """
    First line
    Second Line
    """
    value: String
  }
`

Expected behavior:

Unless I'm mistaken, the empty comment line should not be removed by prettier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:graphqlIssues affecting GraphQL

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions