microsoft / microsoft/TypeScript
[Rename symbol command] Remove unnecessary named import
オープン
まだ誰も着手していません。
Effort: Casual
Experience Enhancement
Help Wanted
Suggestion
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.4k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 117
説明
- VS Code Version: 1.84.2 (1a5daa3a0231a0fbba4f14db7ec463cf99d7768e)
- OS Version: macOS Sonoma 14.1.1
Steps to Reproduce:
- Create 2 JS files:
// utils.js export const foo = () => console.log('Hello world!');// index.js import { foo as bar } from "./utils.js"; bar();
- Put your cursor in the word "foo" in utils.js and use the "Rename Symbol" command (
F2by default) to rename the function tobar. - Observe the import in index.js has changed to
import { bar as bar } from "./utils.js". Since the names import is no longer necessary, the command should instead change the import toimport { bar } from "./utils.js".
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
utils.js と index.js という名前の 2 つの JavaScript ファイルで Rename Symbol コマンドを再現し、F2 を使用して foo を bar に名前変更します。そのコマンドから名前変更のフローを追跡し、index.js の完成した import が冗長なエイリアスを保持せず、import { bar } from "./utils.js" になっていることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, typescript
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 48/100