Update ember-eslint-parser to 0.11#2735
Merged
NullVoxPopuli merged 1 commit intomasterfrom Apr 25, 2026
Merged
Conversation
Contributor
🏎️ Benchmark Comparison
Full mitata output |
This was referenced Apr 24, 2026
NullVoxPopuli
pushed a commit
that referenced
this pull request
Apr 24, 2026
The rule flagged yield-only templates by asserting `templateNodes.length === 1 && isYieldOnly(templateNodes[0])`. That works only while the parser strips template comments out of the body, which ember-estree 0.4.2 happened to do. Upstream ember-estree 0.4.3 (#31) began keeping MustacheCommentStatement nodes in the body, so a template like <template>{{! some comment }}{{yield}}</template> now yields a body of length 2 and silently stops being flagged — which is also why PR #2735 (upgrade to ember-eslint-parser 0.11) fails this rule's CI. Ignoring comment and whitespace-only text nodes before the length check aligns with: - upstream ember-template-lint's `no-yield-only.js` (unchanged there since comments-in-body is the native Glimmer AST shape anyway) - the sibling rule `template-no-bare-yield.js`, which already uses the same `isEmptyNode` filter The fix is a no-op on the currently-pinned [email protected] and fixes the rule under any parser version that preserves comment nodes in the template body. The rule also now correctly catches yield-only templates that contain HTML comments (`<!-- x -->{{yield}}`), which it was silently missing before.
This comment was marked as outdated.
This comment was marked as outdated.
This reverts commit 7676bb3.
c7d45f0 to
ddf99c7
Compare
Contributor
|
This looks good to me. Recap: The bugfixes above made the CI on this PR red a short while, as it surfaced an unrelated template-no-yield-only rule bug now fixed in #2736. |
This was referenced Apr 25, 2026
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.
bugfixes!