Microsoft/TypeScript

Support column limit in formatter

Open

#1.988 geöffnet am 9. Feb. 2015

Auf GitHub ansehen
 (7 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (6.726 Forks)batch import
Help WantedSuggestion

Repository-Metriken

Stars
 (48.455 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 6T 17h) (9 gemergte PRs in 30 T)

Beschreibung

Currently, running the formatter (eg via the compiler API: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#pretty-printer-using-the-ls-formatter) produces code which is arbitrarily wide, for statements which are nested, complex, etc.

Our style guide requires a maximum columns, which means the formatter should take a configuration for how wide this is. Line breaks should probably be added at the highest point in the AST on the long line.

Contributor Guide