Microsoft/TypeScript

Formatter should convert object literal to multiple lines / one line

Offen

#25.771 geöffnet am 18.07.2018

 (4 Kommentare) (1 Reaktion) (0 zugewiesene Personen)TypeScript (13.395 Forks)batch import
Domain: FormatterHelp WantedSuggestion

Repository-Metriken

Stars
 (108.860 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

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.

Contributor Guide