Skip to content

formatter: support ignore comments before expression statements #14808

@sapphi-red

Description

@sapphi-red

I'm not sure if it's specifically for expression statements.

The case I found is:

// prettier-ignore
Object.defineProperties    (    exports    , {
  hello: {
    value() {
      return 'Hello World!'
    }
  }
})

playground

On the other hand, ignore comment before a variable declaration worked (playground).

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions