Skip to content

Commit 44f81f7

Browse files
committed
Simplify comment: focus on HBS scope limitation, drop unverified GJS edge case
1 parent 5fddf2b commit 44f81f7

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

lib/rules/template-no-obsolete-elements.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,11 @@ module.exports = {
5151
create(context) {
5252
const obsolete = new Set(OBSOLETE);
5353

54-
// Manual block-param tracking is intentional here. The ESLint scope manager
55-
// cannot be used as a drop-in replacement because:
56-
//
57-
// 1. In GJS/GTS, an element's own `as |x|` block params are already
58-
// visible in the scope at the element node itself, so getScope(node) on
59-
// `<marquee as |marquee|>` would incorrectly skip flagging it.
60-
//
61-
// 2. In HBS mode the scope manager only creates a minimal top-level scope;
62-
// block params from `{{#let ... as |x|}}` are not registered, so
63-
// getScope would not see them at all.
64-
//
65-
// The push/pop approach handles both edge cases correctly.
54+
// Manual block-param tracking is intentional here. In HBS mode the ESLint
55+
// scope manager does not register Glimmer block params (from
56+
// {{#let ... as |x|}} or <Comp as |x|>), so getScope() would not see them.
57+
// The push/pop stack handles both GlimmerBlockStatement and
58+
// GlimmerElementNode uniformly.
6659
const blockParamsInScope = [];
6760

6861
return {

0 commit comments

Comments
 (0)