Skip to content

Extract rule: template-require-iframe-src-attribute#2605

Merged
NullVoxPopuli merged 2 commits intoember-cli:masterfrom
NullVoxPopuli:nvp/template-lint-extract-rule-template-require-iframe-src-attribute
Mar 20, 2026
Merged

Extract rule: template-require-iframe-src-attribute#2605
NullVoxPopuli merged 2 commits intoember-cli:masterfrom
NullVoxPopuli:nvp/template-lint-extract-rule-template-require-iframe-src-attribute

Conversation

@NullVoxPopuli
Copy link
Contributor

Split from #2371.

Copy link

@NullVoxPopuli-ai-agent NullVoxPopuli-ai-agent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@NullVoxPopuli NullVoxPopuli force-pushed the nvp/template-lint-extract-rule-template-require-iframe-src-attribute branch from 12a9c3b to 1dc3c52 Compare March 20, 2026 15:50
@NullVoxPopuli NullVoxPopuli merged commit fb4e650 into ember-cli:master Mar 20, 2026
11 checks passed
@NullVoxPopuli NullVoxPopuli deleted the nvp/template-lint-extract-rule-template-require-iframe-src-attribute branch March 20, 2026 18:05
@github-actions github-actions bot mentioned this pull request Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants