Microsoft/TypeScript

Support column limit in formatter

Open

#1,988 opened on 2015年2月9日

GitHub で見る
 (7 comments) (0 reactions) (0 assignees)TypeScript (48,455 stars) (6,726 forks)batch import
Help WantedSuggestion

説明

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.

コントリビューターガイド

Support column limit in formatter · Microsoft/TypeScript#1988 | Good First Issue