You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/core/src/lint/hyperframeLinter.ts
+163-3Lines changed: 163 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -276,11 +276,11 @@ export function lintHyperframeHtml(
276
276
continue;
277
277
}
278
278
pushFinding({
279
-
code: "suspicious_global_gsap_selector",
279
+
code: "unscoped_gsap_selector",
280
280
severity: "warning",
281
-
message: `Timeline "${localTimelineCompId}" uses a global selector "${window.targetSelector}" that may escape composition scope.`,
281
+
message: `Timeline "${localTimelineCompId}" uses unscoped selector "${window.targetSelector}" that will target elements in ALL compositions when bundled, causing data loss (opacity, transforms, etc.).`,
282
282
selector: window.targetSelector,
283
-
fixHint: `Scope the selector like \`[data-composition-id="${localTimelineCompId}"] ${window.targetSelector}\` or use a unique id.`,
283
+
fixHint: `Scope the selector: \`[data-composition-id="${localTimelineCompId}"] ${window.targetSelector}\` or use a unique id.`,
284
284
snippet: truncateSnippet(window.raw),
285
285
});
286
286
}
@@ -346,6 +346,75 @@ export function lintHyperframeHtml(
346
346
}
347
347
}
348
348
349
+
// #3.5: Self-closing <audio .../> or <video .../> — CRITICAL
350
+
// In HTML5, <audio> and <video> are NOT void elements. The browser silently
351
+
// ignores the "/>", leaving the tag open. All subsequent sibling elements
352
+
// become invisible fallback content inside the media tag, making entire
353
+
// compositions disappear. This is the #1 cause of "black preview" bugs.
message: `Self-closing <${tagName}/> is invalid HTML. The browser will leave the tag open, swallowing all subsequent elements as invisible fallback content. This makes compositions INVISIBLE.`,
364
+
elementId,
365
+
fixHint: `Change <${tagName} .../> to <${tagName} ...></${tagName}> — media elements MUST have explicit closing tags.`,
366
+
snippet: truncateSnippet(scMatch[0]),
367
+
});
368
+
}
369
+
}
370
+
371
+
// #3.6: Placeholder/fake media URLs — CRITICAL
372
+
// Placeholder URLs (placehold.co, placeholder.com, example.com) will 404 at render time.
0 commit comments