Skip to content

Multi-line binary expression in call args causes closing paren to be placed on same line as last arg #550

Open
@jakebailey

Description

@jakebailey

Describe the bug

dprint-plugin-typescript version: 0.86.1

Input Code

forEach(arr, f =>
    a()
    && b()
);

Expected Output

Maybe...

forEach(arr, f => a() && b());

forEach(
  arr,
  f => a() && b()
);

Actual Output

forEach(arr, f =>
  a()
  && b());

Playground Link

Truthfully, I'm not sure what the bug is here, but it seems a little odd to me in the first code snippet that the paren would get moved up a line.

See also: microsoft/TypeScript#54820 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions