Microsoft/TypeScript

Formatter should convert object literal to multiple lines / one line

Aperta

#25.771 aperta il 18 lug 2018

 (4 commenti) (1 reazione) (0 assegnatari)TypeScript (13.395 fork)batch import
Domain: FormatterHelp WantedSuggestion

Metriche repository

Star
 (108.860 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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.

Guida contributor