dprint-plugin-typescript icon indicating copy to clipboard operation
dprint-plugin-typescript copied to clipboard

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

Open jakebailey opened this issue 2 years ago • 0 comments

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;

jakebailey avatar Aug 11 '23 18:08 jakebailey