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

Abierto
#43 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
70/100
Tipo de issue
Refactorización
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript, vite

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
TypeScript
Estrellas
3
Forks
3
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de TMHSDigital/GH-Arcade

Todos los issues de TMHSDigital/GH-Arcade

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.