Skip to content

fix(lint): dedupe CSS transform text in gsap_css_transform_conflict - #3761

Open
Abhishek-kumarsingh wants to merge 1 commit into
heygen-com:mainfrom
Abhishek-kumarsingh:fix/gsap-css-transform-conflict-dedup
Open

fix(lint): dedupe CSS transform text in gsap_css_transform_conflict#3761
Abhishek-kumarsingh wants to merge 1 commit into
heygen-com:mainfrom
Abhishek-kumarsingh:fix/gsap-css-transform-conflict-dedup

Conversation

@Abhishek-kumarsingh

Copy link
Copy Markdown

Summary

Fixes #3263. In the gsap_css_transform_conflict rule, cssTransform is built by joining cssFromTranslate and cssFromScale. When a single CSS declaration matches both the translate and scale selector maps (e.g. transform: scale(1.08) translate3d(1.5%, 0, 0)), both variables resolve to the same full-transform string, and .join(" ") concatenates the identical string with itself — doubling the text in both the finding message and fixHint.

Fix

Deduplicate before joining, as suggested in the issue:

cssTransform: [...new Set([cssFromTranslate, cssFromScale].filter(Boolean))].join(" ")

Test plan

  • Added a failing regression test reproducing the issue's exact repro (combined scale()/translate3d() declaration), confirmed it failed before the fix
  • Applied the one-line fix, confirmed the new test and the full @hyperframes/lint suite pass (607/607)
  • oxlint and oxfmt --check clean on changed files

When one declaration (e.g. transform: scale(1.08) translate3d(1.5%, 0, 0))
matches both the translate and scale selector maps, cssFromTranslate and
cssFromScale end up equal, and join(" ") concatenated the identical string
with itself in both the finding message and fixHint.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LQXJUdfkq6CGWh6KNfVXyw
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.

lint: gsap_css_transform_conflict doubles the CSS transform text when one declaration has both translate and scale

1 participant