-
-
Notifications
You must be signed in to change notification settings - Fork 211
Post-merge-review: use scope manager for block-param tracking in template-no-obsolete-elements #2676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
NullVoxPopuli
merged 8 commits into
ember-cli:master
from
johanrd:night_fix/template-no-obsolete-elements
Apr 19, 2026
Merged
Post-merge-review: use scope manager for block-param tracking in template-no-obsolete-elements #2676
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
029c2c0
Fix template-no-obsolete-elements: track element-level block params
johanrd 5fddf2b
Document why manual block-param tracking is used instead of scope man…
johanrd 44f81f7
Simplify comment: focus on HBS scope limitation, drop unverified GJS …
johanrd 6189818
refactor(template-no-obsolete-elements): use scope manager for block …
johanrd c0df35f
Merge branch 'master' into night_fix/template-no-obsolete-elements
johanrd 85e6988
chore: remove stray blank line after OBSOLETE array
johanrd a2ec4be
lint: hoist hasBindingInScopeChain to module scope, add curly braces
johanrd 0c5ea45
chore(deps): bump ember-eslint-parser to ^0.10.0
johanrd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be the responsibility of the scope manager?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a clarification above blockParamsInScope now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kinda seems like we should fix that rather than add a work-around here, ya?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, maybe, although I'm not sure how to approach that.
To my understanding,
getScope()runs into two problems:HBS mode: ember-eslint-parser's HBS path creates an intentionally empty scope manager — Glimmer block params from
{{#let ... as |x|}}and<Comp as |x|>are not registered, so getScope() sees nothing.GTS mode: at the GlimmerElementNode visitor, the element's own as |x| params are already visible in scope. So getScope() at
<marquee as |marquee|>test would find marquee in scope and incorrectly suppress the flag. The push-after-check ordering handles this: the element is checked against outer params only, then its own are pushed for its children.or were you thinking something else completely? upstream to ember-eslint-parser? thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switched to scope-manager (getScope(node.parent) + chain walk) as suggested. 36/37 tests pass; the one failing HBS test is blocked on ember-tooling/ember-eslint-parser#189