Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Router parsers scan the whole module, so a stray <Route> or {path} decoy becomes a route

Abierto
#227 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
typescript
Área
tooling

Línea de trabajo

Read the parseRouteTags, parseRouterFallback, and parseDataRouterRoutes implementations, plus the init and route-manifest call paths. Compare how parseDataRouterRoutes identifies its router input and trace how parsed routes are merged. Done means both parsers only attribute routes owned by the actual router, or leave attribution null when it cannot be identified; add regression coverage for decoy route text outside the router.

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

Descripción

area: setup bug

Follow-up to #226.

What is wrong

Two router parsers read path/component text from the entire module rather than the actual router:

  • parseRouteTags (used by init) scans all <Route path element> JSX in the file. A stray or commented-out <Route path="/account" element={<Decoy />} /> that is not the real router is still attributed, and via mergeParsedRoutes its non-null component wins over a data-router entry, so init can write /account -> Decoy.tsx into the authoritative sidecar.
  • parseRouterFallback (used by route-manifest) scans the whole file for path:/path=, so an unrelated { path: '/decoy' } object becomes a route.

Both predate #226 (init used parseRouteTags alone before), which is why they were left out of that PR.

Why it matters

An invented or mis-attributed route can map a changed file to a screen it does not render, which is false coverage. init writes a draft a human reviews, but route-manifest feeds discovery directly.

Fix

Scope both parsers to the actual router element or the create*Router(...) argument (as parseDataRouterRoutes now does), or leave attribution null when the owning router cannot be identified.

Lenguaje dominante
TypeScript
Estrellas
0
Forks
0
Merge medio
2 h 48 min
PR fusionados (30 d)
8

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

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 usabl-dev/usabl

Todos los issues de usabl-dev/usabl

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.