Skip to content

On multi-line union/intersections, place the semicolon on its own line #547

Open
@jakebailey

Description

@jakebailey

This is something I see in the TS repo and DT often:

type Foo =
    | A
    | B
    | C
    ;

type Bar =
    & A
    & B
    & C
    ;

This form is convenient becuase it allows diffs to not break when the last line changes, and allows you to copy/move the last item without messing with the semicolon.

dprint curretly formats the above like:

type Foo =
    | A
    | B
    | C;

type Bar =
    & A
    & B
    & C;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions