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

Offen
#43 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
70/100
Issue-Typ
Refactoring
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
typescript, vite

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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

Vorherrschende Sprache
TypeScript
Sterne
3
Forks
3
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus TMHSDigital/GH-Arcade

Alle Issues in TMHSDigital/GH-Arcade

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.