Skip to content

Add option for parentheses around JSX. #2724

@MartynasZilinskas

Description

@MartynasZilinskas

I think prettier should have an option for TypeScript to omit JSX parentheses.

Instead of this:

public render(): JSX.Element {
    return (
        <div>
            <div>Hello world!</div>
        </div>
    );
}

Expected behavior:

public render(): JSX.Element {
    return <div>
        <div>Hello world!</div>
    </div>;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    keep-unlockedstatus:needs discussionIssues needing discussion and a decision to be made before action can be taken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions