Commit 9fa967e
committed
Fix template-no-input-block false positive in GJS/GTS
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.1 parent b705850 commit 9fa967e
File tree
2 files changed
+31
-0
lines changed- lib/rules
- tests/lib/rules
2 files changed
+31
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
21 | 30 | | |
22 | 31 | | |
23 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
14 | 36 | | |
15 | 37 | | |
16 | 38 | | |
| |||
0 commit comments