Skip to content

Brackets around ternary as twice-curried arrow function body are removed #14290

@Josh-Cena

Description

@Josh-Cena

Prettier 2.8.3
Playground link

--parser babel

Input:

Y(() => a ? b : c);
Y(() => () => a ? b : c);

Output:

Y(() => (a ? b : c));
Y(() => () => a ? b : c);

Expected behavior:

For consistency:

Y(() => (a ? b : c));
Y(() => () => (a ? b : c));

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.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions