microsoft / microsoft/TypeScript

Document quick fix (or whatever it's officially called)

オープン
#29,048 コメント 10 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

In Discussion Suggestion
主要言語
Go
スター
111k
フォーク
14.3k
平均マージ
1日 19時間
マージ済み PR(30日)
117

説明

TypeScript Version: 3.3.0-dev.201xxxxx

Search Terms:
code fix
quick fix
suggestion

Code
not entirely applicable, but this is what I had which caused me to get confused

const fs = require("fs");

Expected behavior:
Commandline tsc should behave the same as editor integrations

Actual behavior:
The "quick fix" feature, which appears to be called "code fixes" in the codebase and googling the messages led me to the json file which refers to them as "suggestions", only appears to exist in the typescript server.

As a newcomer this had me extremely confused. I was running tsc on the commandline and getting no errors, but seeing squiggly lines and messages in my editor (atom, in this case).

I was unable to find any documentation about where the message 'require' call may be converted to an import was coming from, or that this was a hint that typescript was able to fix my code for me.

It would also be helpful if the tsc client was able to list the code fix suggestions, even if giving it a way to apply them would be too complex.

Playground Link:
n/a

Related Issues:
none that I could find

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、コマンドラインでの tsc の動作を、issue で説明されている TypeScript server およびエディター統合と比較します。TypeScript コードベースとその message JSON における code-fix の用語を追跡し、そのうえで、ドキュメントだけでこの差異をカバーできるのか、それとも tsc で候補を一覧表示することも必要なのかを判断します。完了とは、用語とサポートされる動作が明確に文書化されていることを意味します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
cli, documentation
issue の種類
ドキュメント
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。