Microsoft/TypeScript

Support column limit in formatter

Open

#1,988 建立於 2015年2月9日

在 GitHub 查看
 (7 留言) (0 反應) (0 負責人)TypeScript (6,726 fork)batch import
Help WantedSuggestion

倉庫指標

Star
 (48,455 star)
PR 合併指標
 (平均合併 6天 17小時) (30 天內合併 9 個 PR)

描述

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.

貢獻者指南