Skip to content

fix(lint): block executed invalid raw selectors - #3713

Open
miguel-heygen wants to merge 1 commit into
mainfrom
magi/fix-executed-invalid-selector
Open

fix(lint): block executed invalid raw selectors#3713
miguel-heygen wants to merge 1 commit into
mainfrom
magi/fix-executed-invalid-selector

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

Summary

hyperframes check now blocks a digit-leading ID only when source proves that its raw #id selector is executed by a GSAP tween or querySelector(All). The existing id_requires_css_escape warning remains for legal HTML IDs that are unused, accessed through getElementById, or escaped with CSS.escape/CSS syntax.

The detector reads literal calls from the Acorn AST. It does not infer danger from a parser-resolved element variable, computed selector, comment, or displayed string, which keeps the new error tied to a browser-fatal execution path.

Validation

  • Full GSAP lint suite: 168/168 tests passed.
  • Core lint controls: 59/59 tests passed.
  • Parser and lint package typechecks passed.
  • Changed-file format, 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: error-level invalid_raw_selector_execution correctly catches digit-leading IDs used as raw CSS selectors in GSAP and querySelector calls. Parser extracts only literal string selectors. Properly scoped — escaped and getElementById paths not flagged. — Miga

@miga-heygen
miga-heygen enabled auto-merge (squash) 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