Skip to content

fix(lint): warn on undefined GSAP color variables - #3723

Merged
miga-heygen merged 1 commit into
mainfrom
magi/fix-gsap-undefined-css-variable
Sep 8, 2026
Merged

miga-heygen merged 1 commit into
mainfrom
magi/fix-gsap-undefined-css-variable

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

Summary

Static lint now warns when a GSAP color-like tween uses var(--name) without a fallback and no definition can be found in authored CSS or data-composition-variables. This points authors to the source of text that can become invalid or transparent before the existing browser check reports only the generic text_not_painted symptom.

The warning checks both fromTo endpoints and color, *Color, fill, and stroke properties. It remains silent for style-block and inline custom-property definitions, var() fallbacks, and composition variables that runtime exposes as --<id>.

The reported Whisper behavior is intentionally excluded. The packed v0.8.29 CLI already exits 1 when the required engine is unavailable and 0 only with --optional; changing that contract would regress working behavior.

Validation

  • Full GSAP lint suite: 171/171 tests passed.
  • Composition-variable controls: 140/140 tests passed.
  • Lint package typecheck passed.
  • Changed-file formatting, lint, and diff checks passed.

@miga-heygen miga-heygen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed: gsap_undefined_css_variable correctly checks color properties for var() references without fallback or static definition. Respects composition-variable declarations and inline styles. Tests cover all paths. — Miga

@miga-heygen
miga-heygen enabled auto-merge (squash) September 8, 2026 18:09
@miga-heygen
miga-heygen merged commit 4958a9f into main Sep 8, 2026
47 checks passed
@miga-heygen
miga-heygen deleted the magi/fix-gsap-undefined-css-variable branch September 8, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants