fix(core): add lint rule for infinite GSAP repeat#218
Merged
miguel-heygen merged 2 commits intomainfrom Apr 7, 2026
Merged
Conversation
Collaborator
Author
This was referenced Apr 7, 2026
4 tasks
f295a17 to
af367d8
Compare
33bfdcc to
8c5cec0
Compare
2 tasks
Detects `repeat: -1` in GSAP timelines and reports it as an error. Infinite repeats break the deterministic capture engine which seeks to exact frame times — the timeline never resolves a finite duration. This caused the loading-spinner eval (prompt 20, 2.0/5) to render as a blurry compressed mess. The rule instructs authors to calculate a finite repeat count from the composition duration instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
8c5cec0 to
883bd82
Compare
dfc54d9 to
12c5b65
Compare
Add negative lookahead (?!\d) to the repeat: -1 regex so it only matches exactly -1, not -10, -100, etc. Add test case. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
12c5b65 to
17791d1
Compare
jrusso1020
approved these changes
Apr 7, 2026
Collaborator
Author
Merge activity
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Adds a new lint rule
gsap_infinite_repeatthat flagsrepeat: -1in GSAP timelines as an error. This is a hard enforcement of the skill guardrail added in PR #217.What it fixes
The deterministic capture engine (
HeadlessExperimental.beginFrame) seeks to exact frame times on a paused GSAP timeline. When a timeline containsrepeat: -1, the timeline duration is infinite, which causes the capture engine to produce incorrect/blurry output.Eval prompt #20 (loading-spinner, scored 2.0/5) used
repeat: -1on a dots animation cycle, producing "a highly compressed and blurry loading animation lacking visual clarity and professional polish."Changes
packages/core/src/lint/rules/gsap.ts— newgsap_infinite_repeatrule (regex scan forrepeat: -1)packages/core/src/lint/rules/gsap.test.ts— 2 new tests (detects infinite repeat, allows finite repeat)Test plan
pnpm --filter @hyperframes/core test— all 429 tests passrepeat: -1and reports as error with fix hintrepeat: 4(finite repeats)