microsoft / microsoft/TypeScript
Support column limit in formatter
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 132
説明
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.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、issue にリンクされている compiler API's pretty-printer と language-service formatter のドキュメントを確認し、次に formatter entry point と、ネストされた AST ノードをどのように表現しているかを追ってください。完了の条件は、formatter が最大のカラム幅を受け付け、幅が広すぎるネストされた文に対して改行を生成し、その挙動を代表的な複雑なコードで検証できることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- compilers
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100