Skip to content

Unnecessary parens around await call #3089

@ghost

Description

Prettier 1.7.4
Playground link

Input:

(async () => {
  foo && await bar();
});

Output:

async () => {
  foo && (await bar());
};

Expected behavior:

Parens around the await call are unnecessary, as evidenced by the fact that it compiles.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions