lint: report AVIF/M4A media-kind mismatches consistently with JPEG/MP3
メンテナーはふだん 1 日以内に返信
@Yi-111-a がすでに取り組んでいます。
2026年9月30日 から。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 91/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- bun, typescript
- 領域
- testing-qa, tooling
調査の方向性
packages/lint/src/rules/media.ts の既知の拡張子セットから始め、次に packages/lint/src/rules/media.test.ts の関連するケースを読んでください。M4A と AVIF の回帰テストを追加し、正しく受け入れられる要素と、既存のサフィックスおよび大文字・小文字の動作を含めてください。その後、再現手順と、指定された lint テスト、oxlint、oxfmt の各コマンドを実行してください。未知の拡張子に対する動作を変更せず、両方の不一致で既存の診断が生成されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 54.1k
- フォーク
- 4.9k
- 平均マージ
- 7時間 19分
- マージ済み PR(30日)
- 746
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
heygen-com/hyperframes のほかの issue
-
gcp-cloud-run image pins Chrome 148, which drops `background-clip: text` glyphs inside layered children; the CLI's Chrome 152 paints them対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
heygen-com/hyperframes#5117 ·
メンテナーはふだん 1 日以内に返信
-
Docs: clarify that "Enable auto-update" is only available in the Claude Code terminal (CLI) /plugin UI対応中かも @rumi7911 が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
heygen-com/hyperframes#5027 ·
メンテナーはふだん 1 日以内に返信
-
fix(producer): propagate useGpu to HDR layered streaming encoder対応中かも @Monster-GM が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 87/100
heygen-com/hyperframes#5002 ·
メンテナーはふだん 1 日以内に返信
-
skills: remoteHeadSha() can open a Git Credential Manager dialog on Windows (GIT_TERMINAL_PROMPT does not cover GUI helpers; slug unvalidated)対応中かも @RaphaelFakhri が 8 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
heygen-com/hyperframes#4702 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Studio catalog prompt editor has no accessible name対応中かも @lorenzozanee が 15 日前に担当しました。 オープンbug difficulty/easy triage/ready
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
heygen-com/hyperframes#4384 ·
メンテナーはふだん 1 日以内に返信
heygen-com/hyperframes の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
core
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
vectorize-io/hindsight#5457 ·
メンテナーはふだん 1 日以内に返信
-
beginner friendly community contributions-welcome good first issue hacktoberfest help wanted testing up-for-grabs
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
lukilabs/beautiful-mermaid#160 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
rescript-lang/rescript-lang.org#1420 ·
メンテナーはふだん 2 日以内に返信