Remove duplicate helpers and unused exports in shared/ and the hub

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
70/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript, vite

調査の方向性

Start with the listed duplicate definitions in src/hub/main.ts, src/hub/trophies-panel.ts, shared/ui.ts, shared/palette.ts, shared/storage.ts, shared/chrome.ts, src/hub/navigation.ts, shared/controls.ts, shared/phaser-config.ts, and scripts/new-game.mjs. Check each usage before consolidating helpers, removing exports, or correcting the drawGrid comment. Run npm run typecheck and npm run build; done when both pass and behavior is unchanged.

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

説明

good first issue severity: low tech-debt

Summary

A checklist of small duplicates and dead surface, each verified by searching the repo.

Where

  • escapeHtml is defined identically in src/hub/main.ts:106-108 and src/hub/trophies-panel.ts:8-10
  • hex() in shared/ui.ts:20-22 and cssColor() in shared/palette.ts:15-17 have the same body
  • The gh-arcade: storage prefix is a private constant in shared/storage.ts:2 and a retyped literal in shared/chrome.ts:68
  • The /GH-Arcade/ base path is a constant in vite.config.ts:7 and a literal in scripts/new-game.mjs:44
  • Gamepad button indices and the stick threshold are repeated in src/hub/navigation.ts:76-87 and shared/controls.ts
  • createArcadeGame (shared/phaser-config.ts:33) and DEFAULT_BINDINGS (shared/controls.ts:28) are exported but used only in their own file
  • drawGrid (shared/ui.ts:61-62) is documented as used by every game but is called by one menu and the template

Suggested fix

Keep one copy of each helper, export the storage prefix, drop the unused exports and correct the comment.

Acceptance criteria

  • npm run typecheck passes and behaviour is unchanged

Getting started

  • Relevant files: shared/ui.ts, shared/palette.ts, shared/storage.ts, shared/chrome.ts, src/hub/main.ts, src/hub/trophies-panel.ts
  • Run locally: npm install, then npm run dev
  • Checks: npm run typecheck and npm run build (there is no test suite yet)
  • Related docs: README.md

Filed by repo-audit/full-audit at b001f5d. Severity: low. Effort: S. audit-key: tech-debt|shared/ui.ts|hex

主要言語
TypeScript
スター
3
フォーク
3
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

TMHSDigital/GH-Arcade のほかの issue

TMHSDigital/GH-Arcade の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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