Microsoft/TypeScript

Formatter should convert object literal to multiple lines / one line

Open

#25,771 opened on 2018年7月18日

GitHub で見る
 (4 comments) (1 reaction) (0 assignees)TypeScript (6,726 forks)batch import
Domain: FormatterHelp WantedSuggestion

Repository metrics

Stars
 (48,455 stars)
PR merge metrics
 (平均マージ 6d 17h) (30d で 9 merged PRs)

説明

TypeScript Version: 3.1.0-dev.20180717

Code

const o = { a: 0, b: 1, c: 2 };

Expected behavior:

A refactor exists to convert to:

const o = {
    a: 0,
    b: 1,
    c: 2,
};

and back.

Actual behavior:

No such refactor. I have to do a lot of manual editing of whitespace.

コントリビューターガイド