lint: report AVIF/M4A media-kind mismatches consistently with JPEG/MP3
I maintainer di solito rispondono entro 1 giorno
@Yi-111-a ci sta già lavorando.
Dal 30/9/2026.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 91/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- bun, typescript
- Ambito
- testing-qa, tooling
Direzione di ricerca
Inizia da packages/lint/src/rules/media.ts, negli insiemi di estensioni noti, quindi leggi i casi correlati in packages/lint/src/rules/media.test.ts. Aggiungi una copertura di regressione per M4A e AVIF, includendo gli elementi corretti accettati e il comportamento esistente per suffissi e maiuscole/minuscole, quindi esegui la riproduzione e i comandi specificati per il test lint, oxlint e oxfmt. Il lavoro è completato quando entrambe le discrepanze producono la diagnostica esistente senza modificare il comportamento per le estensioni sconosciute.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The existing media-kind rule catches an image element pointing to MP3 or a video element pointing to JPEG, but misses the same mistakes for M4A and AVIF. Those two known formats are absent from the extension sets.
Reproduction
From the repository root:
cat > /tmp/hf-d7.ts <<'TS'
const { lintHyperframeHtml } = await import(`${process.cwd()}/packages/lint/src/hyperframeLinter.ts`);
const wrap = (body: string) => `<html><body><div id="main" data-composition-id="main" data-no-timeline data-width="1920" data-height="1080" data-duration="10">${body}</div></body></html>`;
for (const file of ["voice.mp3", "voice.m4a", "photo.jpg", "photo.avif"]) {
const body = file.startsWith("voice") ? `<img id="img" src="${file}">` : `<video id="v" muted data-start="0" data-duration="3" src="${file}"></video>`;
console.log(file, (await lintHyperframeHtml(wrap(body))).findings.map((f: {code: string}) => f.code));
}
TS
bun /tmp/hf-d7.ts
Observed:
voice.mp3 [ "media_src_kind_mismatch" ]
voice.m4a []
photo.jpg [ "media_src_kind_mismatch" ]
photo.avif []
Expected: all four incorrect tag/source combinations receive media_src_kind_mismatch; the M4A case is identified as audio and AVIF as image.
Scope and suggested approach
Update the known extension sets in media.ts and add regression cases to media.test.ts. AVIF is already covered by engine file-server tests; M4A is used in audioMixer tests.
Limit the change to these established extensions. Do not add network probing or assume the kind of ambiguous containers such as OGG.
Acceptance criteria
- Both missing cases produce the existing diagnostic with accurate audio/image wording.
- Correct AVIF image and M4A audio elements remain accepted by this rule.
- Uppercase extensions and URL query/hash suffixes work consistently with existing supported extensions.
- Unknown extensions remain conservative and existing media-rule tests pass.
Estimated difficulty: easy. Reviewer/mentor: pending.
Related work
PRs #3741 and #3609 introduced the existing media-kind checks and are reflected in current source. This is a bounded follow-up for two missing extensions; no active matching follow-up was found in the checked inventory.
Validation
From a dependency-installed repository checkout, run the reproduction above with Bun. It imports source directly and does not need real media files, Chrome, or FFmpeg. Add regression cases in the linked existing suite, then run:
bun run --cwd packages/lint test src/rules/media.test.ts
bunx oxlint packages/lint/src/rules/media.ts packages/lint/src/rules/media.test.ts
bunx oxfmt --check packages/lint/src/rules/media.ts packages/lint/src/rules/media.test.ts
Discovery ran the minimal source-level reproduction, not the full test suite or a video render. Reproduced on fa4261beea63bb4f36ff6a2f20fb4646fae3f2c6 (0.8.68); relevant source is unchanged on origin/main at 86fa10ced4297bfd9f4fe67b6767afae7a07fd3c (0.8.69).
Overlap refresh: checked open issue/PR titles and bodies from the fresh publication inventory on 2026-09-23; no matching active implementation found. Before starting, check the discussion and linked PRs, then comment with your intended approach so ownership can be coordinated.
- Lingua principale
- TypeScript
- Stelle
- 54.1k
- Fork
- 4.9k
- Merge medio
- 7h 19m
- PR unite (30g)
- 746
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di heygen-com/hyperframes
-
gcp-cloud-run image pins Chrome 148, which drops `background-clip: text` glyphs inside layered children; the CLI's Chrome 152 paints themForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
heygen-com/hyperframes#5117 ·
I maintainer di solito rispondono entro 1 giorno
-
Docs: clarify that "Enable auto-update" is only available in the Claude Code terminal (CLI) /plugin UIForse già presa @rumi7911 l’ha presa 2 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
heygen-com/hyperframes#5027 ·
I maintainer di solito rispondono entro 1 giorno
-
fix(producer): propagate useGpu to HDR layered streaming encoderForse già presa @Monster-GM l’ha presa 4 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 87/100
heygen-com/hyperframes#5002 ·
I maintainer di solito rispondono entro 1 giorno
-
skills: remoteHeadSha() can open a Git Credential Manager dialog on Windows (GIT_TERMINAL_PROMPT does not cover GUI helpers; slug unvalidated)Forse già presa @RaphaelFakhri l’ha presa 8 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
heygen-com/hyperframes#4702 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Studio catalog prompt editor has no accessible nameForse già presa @lorenzozanee l’ha presa 15 giorni fa. Apertabug difficulty/easy triage/ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
heygen-com/hyperframes#4384 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di heygen-com/hyperframes
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
lukilabs/beautiful-mermaid#160 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
rescript-lang/rescript-lang.org#1420 ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
chthollyphile/folia-major#520 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
databuddy-analytics/Databuddy#1106 ·
I maintainer di solito rispondono entro 1 giorno