microsoft / microsoft/TypeScript
Provide option to organize imports as part of format
オープン
まだ誰も着手していません。
Domain: Formatter
In Discussion
Suggestion
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 117
説明
Header added by @mjbvz
TypeScript Version: 4.4.2
Search Terms
- format / formatting / formatter
- organize imports / sort imports
This feature request is to provide a new option that would automatically run organize imports as part of format.
While VS Code could implement this itself today, handling this on the TS Server would have a few key advantages:
- It would let us edit the document in a single go. Otherwise we have to first format the document and then organize imports. This would cause some flickering and may result in multiple undo stops
- Other consumers of TS could benefit from the feature
Testing microsoft/vscode#48150
This would be awesome.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、TypeScript サーバーに既存の format と organize-imports のリクエストを追跡し、次にフォーマットオプションでそれらをどのように組み合わせられるかを判断します。issue で言及されている VS Code のテストコンテキストを確認します。完了の条件は、そのオプションが 1 回の編集で両方の操作を実行し、単一の undo stop でありながら、他の TypeScript コンシューマーにとっても有用であることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100