Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#227 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
typescript
Domain
tooling

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
2h 48m
Merged PRs (30d)
8

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from usabl-dev/usabl

All issues in usabl-dev/usabl

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.