Microsoft/TypeScript

Support column limit in formatter

開放

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

 (7 則留言) (0 個反應) (0 位負責人)TypeScript (13,395 個分叉)batch import
Help WantedSuggestion

倉庫指標

星標
 (108,860 顆星)
PR 合併指標
 (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.

貢獻者指南