Skip to content

Multi-line arrow-function expression body should not add line break after arrow in certain circumstances #107

@WearyMonkey

Description

@WearyMonkey

Describe the bug

dprint-plugin-typescript version: 0.40.1

Input Code

colors.map(color => darken({
    color,
    opacity: 1
}));

Expected Output

colors.map(color => darken({
    color,
    opacity: 1
}));

Actual Output

colors.map(color =>
  darken({
    color,
    opacity: 1,
  })
);

Playground link

Adding a line break before the arrow makes a lot of code unnecessarily verbose with small expressions.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions