Skip to content

Formatting: inline function with multiple arguments #5376

@oskarrough

Description

@oskarrough

Prettier 1.15.1
Playground link

--parser babylon

Input:

function helloWorld() {
  useEffect(() => {
    // do something
  }, [props.value])
}

Output:

function helloWorld() {
  useEffect(
    () => {
      // do something
    },
    [props.value]
  );
}

Expected behavior:

Like input. Output seems a bit excessive.

If this is intended, please close. Thanks!

Metadata

Metadata

Assignees

Labels

lang:javascriptIssues affecting JSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.status:has prIssues with an accompanying pull request. These issues will probably be fixed soon!

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions