Skip to content

Use of nested decorators breaks #5777

@lougreenwood

Description

@lougreenwood

Prettier 1.16.0
Playground link

--parser babel

Input:

class X {
  @(computed().volatile())
  x
}

Output:

class X {
  @computed().volatile()
  x;
}

Which is wrong and results in a JS exception in the application :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    difficulty:easyIssues that should be easy to fix. Resolve me on the train to work!lang:javascriptIssues affecting JSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.priority:highCode is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!status:has prIssues with an accompanying pull request. These issues will probably be fixed soon!

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions