Skip to content

hyperframes lint: warn on [data-composition-id="<self>"] selectors that do not isolate per-instance #557

@sidorovanthon

Description

@sidorovanthon

Summary

Until per-instance CSS scoping is fixed (see #556), block authors who follow the documented pattern [data-composition-id="my-comp"] { ... } will silently ship blocks that leak across sibling instances. A lint warning would catch this before it hits production rendering.

Suggested rule

For each composition file, parse its CSS (inline <style> and external .css referenced by <link>). For each rule whose selector contains [data-composition-id="<value>"] where <value> matches the file's own composition id (i.e., the value of data-composition-id on the root element):

Notes

  • Severity should be warning, not error: there are legitimate cases where the author wants the rule to apply to all instances (e.g., truly global block styling).
  • Keep silent when the selector targets a different data-composition-id value (legitimate cross-block targeting from a parent).
  • Cross-reference real-world hit: https://github.com/sidorovanthon/anticodeguy-video-editing-studio file docs/operations/planner-pipeline-fixes/findings.md items D15/D21.

Related


Generated by Claude Code (Opus 4.7).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions