Skip to content

Post-merge-review: Fix template-no-obsolete-elements: track element-level block params#2676

Open
johanrd wants to merge 1 commit intoember-cli:masterfrom
johanrd:night_fix/template-no-obsolete-elements
Open

Post-merge-review: Fix template-no-obsolete-elements: track element-level block params#2676
johanrd wants to merge 1 commit intoember-cli:masterfrom
johanrd:night_fix/template-no-obsolete-elements

Conversation

@johanrd
Copy link
Copy Markdown
Contributor

@johanrd johanrd commented Apr 13, 2026

What's broken on master

The rule suppresses reports when the tag name shadows a block param from a GlimmerBlockStatement (e.g. {{#let (...) as |marquee|}}<marquee />). It does not track element-level block params (<Comp as |marquee|>), so angle-bracket shadowing is ignored and the inner <marquee /> is falsely reported.

Fix

Push element block params on GlimmerElementNode enter, pop on exit, mirroring the existing GlimmerBlockStatement handling.

Test plan

36/36 tests pass. 2 new valid tests (element-level shadowing of plaintext and marquee) fail on master.


Co-written by Claude.

The rule suppressed obsolete-element reports when the tag name shadows a
block param from a GlimmerBlockStatement (e.g. {{#let (...) as |marquee|}}).
It did not track element-level block params (<Comp as |marquee|>), so
inside an angle-bracket component the shadowing was ignored and the tag
was falsely reported. Push element block params on enter and pop on exit,
mirroring the existing GlimmerBlockStatement handling.
@johanrd johanrd force-pushed the night_fix/template-no-obsolete-elements branch from 511b615 to 029c2c0 Compare April 13, 2026 10:01
@johanrd johanrd marked this pull request as ready for review April 13, 2026 10:34
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.

1 participant