Skip to content

Commit 4cd0bfc

Browse files
committed
docs(template-require-mandatory-role-attributes): document strict-mode {{input}} assumption (Copilot review)
In strict GJS/GTS, {{input}} could resolve to any imported identifier — not just Ember's classic helper. We assume the classic helper (renders native input); false-positive risk is low in practice because strict-mode authors rarely use the mustache form at all. Document the assumption inline so future readers don't need to re-derive the tradeoff.
1 parent 6deae20 commit 4cd0bfc

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

lib/rules/template-require-mandatory-role-attributes.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ function getTagName(node) {
4848
}
4949
if (node?.type === 'GlimmerMustacheStatement' && node.path?.original === 'input') {
5050
// The classic `{{input}}` helper renders a native <input>.
51+
//
52+
// Caveat: in strict GJS/GTS mode, `{{input}}` is whatever was imported
53+
// under the name `input` — it could be the classic helper (still renders
54+
// native <input>) or some user-defined component. We assume the classic
55+
// helper; the false-positive rate in practice is low because strict-mode
56+
// authors rarely use `{{input}}` at all (idiomatic is <input> or
57+
// <Input>), and when they do, it's almost always the imported built-in.
5158
return 'input';
5259
}
5360
return null;

0 commit comments

Comments
 (0)