microsoft / microsoft/TypeScript

Quick fix menu: default to most common import

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

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

Awaiting More Feedback Domain: LS: Auto-import Suggestion
主要言語
Go
スター
111k
フォーク
14.3k
平均マージ
2日 4時間
マージ済み PR(30日)
132

説明

When a developer opens the "Quick fix" context menu to import a dependency. VSCode currently defaults to alphabetical order, with external dependencies shown first (as best I can tell).

Libraries with similar variable names will often get preference over the most commonly used import in a project. This request would ensure that the most commonly used import is shown first.

In this example the ./utils/store export useTheme is used throughout the project, the @mui/material export useTheme is not used, but is shown first.

Image Image

In this example the ~/utils/store export useStore is used throughout the project, the zustand export useStore is not used, but is shown first.

Image Image

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

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

はじめの一歩

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

調査の方向性

この issue にはファイルまたはテストのエントリーポイントがありません。まず Quick Fix の import ランキング実装と、既存のアルファベット順の動作を特定してください。最も一般的に使用される一致する import が最初に提示され、説明されているローカル対外部のケースをカバーできれば完了です。

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

評価

技術スタック
vscode
領域
developer-experience
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

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

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