Post-merge-review: Fix template-no-input-block false positive in GJS/GTS#2678
Merged
NullVoxPopuli merged 1 commit intoember-cli:masterfrom Apr 13, 2026
Merged
Conversation
The classic `{{input}}` helper is not an ambient strict-mode keyword
(it is not registered in STRICT_MODE_KEYWORDS, and unlike `<Input>`
from `@ember/component` it has no angle-bracket equivalent). In
.gjs/.gts any `{{#input}}` is necessarily a user-imported binding
(or an unbound name that the strict-mode compiler will reject on its
own), so flagging it here would corrupt the user's intent.
The docs already declare this rule "HBS Only", so this fix makes
that claim true: gate the rule to .hbs only via filename extension.
Tests: 13 (was 6) — adds 4 new valid GJS/GTS cases (bare {{#input}},
GTS variant, with `import input` from a custom path, with hash args).
HBS path is unchanged.
NullVoxPopuli
approved these changes
Apr 13, 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.
What's broken on
masterThe classic
{{input}}helper is not an ambient strict-mode keyword (it is not registered inSTRICT_MODE_KEYWORDS, and unlike<Input>from@ember/componentit has no angle-bracket equivalent). The rule's docs already declare it "HBS Only" — but the implementation runs in both modes:Fix
Gate the rule to
.hbsonly via filename extension. Mirror the established pattern used bytemplate-deprecated-render-helper,template-deprecated-inline-view-helper, etc.Test plan
13 tests pass on the branch (was 6). New valid cases:
<template>{{#input}}content{{/input}}</template>in.gjs— silently allowed.gtsimport input from './my-input'; <template>{{#input}}content{{/input}}</template>in.gjs— silently allowedimport input from './my-input'; <template>{{#input value=this.foo}}{{/input}}</template>in.gjs— silently allowed (with hash args)Cowritten by claude