Skip to content

when use @babel/plugin-proposal-logical-assignment-operators, the prettier not work #5237

@luxueyan

Description

@luxueyan

Prettier 1.14.3
Playground link

--parser babylon

Input:
Below code with uncorrectted indent

const a = {
    a() {
       this.name ||= 'haha'
  }
}

Output:

const a = {
    a() {
       this.name ||= 'haha'
  }
}

Expected behavior:
expected format the correct indent

const a = {
  a() {
    this.name ||= 'haha'
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:javascriptIssues affecting JSlocked-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!

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions