Extract rule: template-require-iframe-src-attribute#2605
Conversation
NullVoxPopuli-ai-agent
left a comment
There was a problem hiding this comment.
Review: template-require-iframe-src-attribute
General Correctness
1. Faithful port of the original. The logic is straightforward: check if <iframe> has a src attribute, report if missing. This matches the original exactly.
2. Original supports auto-fix (adding src="about:blank"), but the PR sets fixable: null. This is acceptable for initial migration; auto-fix can be added later.
3. The error message matches the original exactly. Good.
4. Tests cover the key cases: iframe with src, iframe without src, iframe with other attributes but no src. Both gjs and hbs modes tested.
5. Minor: <iframe src=""></iframe> is treated as valid (has a src attribute, even though empty). The original also allows this since it just checks for attribute presence. Consistent.
Scope Analysis (gjs/gts)
This rule only checks GlimmerElementNode for node.tag === 'iframe' -- a plain HTML element. No scope analysis needed.
Summary
Clean, correct migration. No issues found.
🤖 Automated review comparing with ember-template-lint source
12a9c3b to
1dc3c52
Compare
Split from #2371.