Microsoft/TypeScript

Support column limit in formatter

Open

#1,988 创建于 2015年2月9日

在 GitHub 查看
 (7 评论) (0 反应) (0 负责人)TypeScript (48,455 star) (6,726 fork)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