Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Extension resolution assumes JS/TS candidates; a .vue/.svelte sibling can still diverge from the bundler

Aperta
#228 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
typescript, vite

Direzione di ricerca

Start by locating resolveFileAtPath and the code that reads project configuration; the issue does not name file paths or tests. Check how resolve.extensions is parsed and how candidate paths are selected, then run the relevant resolver tests. Done means a base with a matching non-JS extension such as .vue or .svelte is treated as ambiguous and disclosed rather than attributed to a JS/TS candidate.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: engine bug

Follow-up to #226.

What is wrong

resolveFileAtPath discloses when more than one JS/TS candidate file exists, which closes the common false-coverage case. But it only probes JS/TS suffixes (.mjs .js .mts .ts .jsx .tsx and index variants). If a project's resolve.extensions includes a non-JS framework extension (for example .vue or .svelte) and both Widget.vue and Widget.tsx exist, Vite may load Widget.vue while usabl sees a single JS candidate (Widget.tsx) and attributes it.

Why it matters

Low in practice for usabl's current React/PatternFly domain: the mis-picked .tsx would be a file the bundler does not render, so no real barrier is missed, and usabl scans .tsx/.jsx UI files anyway. Tracked so it is not forgotten if usabl targets multi-framework apps.

Fix

Parse the project's resolve.extensions and treat a base with any extra candidate (including non-JS) as ambiguous, disclosing rather than picking a JS/TS file.

Lingua principale
TypeScript
Stelle
0
Fork
0
Merge medio
2h 48m
PR unite (30g)
8

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di usabl-dev/usabl

Tutte le issue di usabl-dev/usabl

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.