Post-merge-review: Fix template-no-obsolete-elements: track element-level block params#2676
Open
johanrd wants to merge 1 commit intoember-cli:masterfrom
Open
Post-merge-review: Fix template-no-obsolete-elements: track element-level block params#2676johanrd wants to merge 1 commit intoember-cli:masterfrom
template-no-obsolete-elements: track element-level block params#2676johanrd wants to merge 1 commit intoember-cli:masterfrom
Conversation
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.
511b615 to
029c2c0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's broken on
masterThe 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
GlimmerElementNodeenter, pop on exit, mirroring the existingGlimmerBlockStatementhandling.Test plan
36/36 tests pass. 2 new valid tests (element-level shadowing of
plaintextandmarquee) fail on master.Co-written by Claude.