Skip to content

"export default async function" wraps function in parenthesis #700

@stewartulm

Description

@stewartulm

"export default async function" adds an unnecessary parenthesis around the entire function:

export default async function foo() {
  console.log('Hello, World');
}

turns into:

export default (async function foo() {
  console.log("Hello, World!");
});

If I remove either the "default" or "async" modifiers, this issue is no longer triggered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.scope:dependencyIssues that cannot be solved inside Prettier itself, and must be fixed in a dependencystatus:has prIssues with an accompanying pull request. These issues will probably be fixed soon!

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions