lint: validate composition variables declared on supported root elements
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
- #4391 de @leorivastech — cerrado sin fusionar
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 88/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- bun, typescript
- Área
- testing-qa, tooling
Línea de trabajo
Comienza en packages/lint/src/rules/composition.ts, en la declaration rule enlazada en el issue, y luego lee getVariables en packages/core/src/runtime/getVariables.ts para identificar los elementos declarantes compatibles. Añade casos de regresión a packages/lint/src/rules/composition.test.ts y ejecuta los comandos de prueba de Bun, oxlint y oxfmt indicados. Se considera terminado cuando las declaraciones mal formadas se notifican una sola vez en sus elementos de origen, mientras que las declaraciones válidas y la precedencia del runtime permanecen sin cambios.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Invalid data-composition-variables JSON is diagnosed on <html> but passes lint on a composition-root div or template root. Runtime supports those declaring elements, so a typo there silently drops declared defaults without the existing helpful diagnostic.
Reproduction
From the repository root:
cat > /tmp/hf-d4.ts <<'TS'
const { lintHyperframeHtml } = await import(`${process.cwd()}/packages/lint/src/hyperframeLinter.ts`);
const root = `<div id="main" data-composition-id="main" data-no-timeline data-width="1920" data-height="1080" data-duration="10" DECLARATION></div>`;
for (const [name, html, options] of [
["html", `<html data-composition-variables='broken'><body>${root.replace("DECLARATION", "")}</body></html>`, {}],
["root", `<html><body>${root.replace("DECLARATION", "data-composition-variables='broken'")}</body></html>`, {}],
["template", `<template>${root.replace("DECLARATION", "data-composition-variables='broken'")}</template>`, { isSubComposition: true }],
] as const) {
console.log(name, (await lintHyperframeHtml(html, options)).findings.map((f: {code: string}) => f.code));
}
TS
bun /tmp/hf-d4.ts
Observed:
html [ "invalid_composition_variables_declaration" ]
root []
template []
Expected: all three malformed declarations receive invalid_composition_variables_declaration.
Scope and suggested approach
The existing declaration rule restricts validation to findHtmlTag(tags). getVariables collects declaring elements beyond <html>, and the existing binding diagnostic supports composition roots. Apply the existing declaration/schema validation to the supported declaring elements. Keep current schema and runtime behavior.
Add cases to composition.test.ts.
Acceptance criteria
- Malformed JSON and invalid declaration shapes are diagnosed on full-document roots and template/fragment composition roots.
- Valid supported declarations remain clean.
- Each invalid declaration is reported once with its actual source location/element where available.
- Multiple declaring elements are checked independently; validation does not change their runtime precedence.
- Existing composition-rule tests pass.
Estimated difficulty: easy. Reviewer/mentor: pending.
Related work
No active matching implementation was found in the checked inventory. Existing root-binding and source-location support should be reused; do not change variable precedence, schema, or the runtime's fallback behavior.
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/composition.test.ts
bunx oxlint packages/lint/src/rules/composition.ts packages/lint/src/rules/composition.test.ts
bunx oxfmt --check packages/lint/src/rules/composition.ts packages/lint/src/rules/composition.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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 54.1k
- Forks
- 4.9k
- Merge medio
- 10 h 29 min
- PR fusionados (30 d)
- 756
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de heygen-com/hyperframes
-
fix(producer): propagate useGpu to HDR layered streaming encoderPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
heygen-com/hyperframes#5002 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
heygen-com/hyperframes#4702 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Studio catalog prompt editor has no accessible namePosiblemente ocupada @lorenzozanee la tomó hace 11 días. Abiertobug difficulty/easy triage/ready
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
heygen-com/hyperframes#4384 ·
Los mantenedores suelen responder en 1 día
-
lint: report AVIF/M4A media-kind mismatches consistently with JPEG/MP3Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug difficulty/easy triage/ready
Dificultad 2/5 1-3 horas Aptitud para principiantes 91/100
heygen-com/hyperframes#4382 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
heygen-com/hyperframes#5005 ·
Los mantenedores suelen responder en 1 día
Todos los issues de heygen-com/hyperframes
Issues similares
-
Upgrade node-libzim to 4.7.0Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
openzim/mwoffliner#2933 ·
Los mantenedores suelen responder en 1 día
-
Use the README category name for website links and submissionsPosiblemente ocupada @dajiaohuang la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
birobirobiro/awesome-shadcn-ui#647 ·
Los mantenedores suelen responder en 2 días
-
Add: Valea Prahovei TV RO SDAbiertocheck:passed streams:add
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Urigo/accounter-fullstack#4604 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día