-
Notifications
You must be signed in to change notification settings - Fork 659
feat(rome_js_analyze): useIframeTitle #4067
Conversation
✅ Deploy Preview for docs-rometools ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
crates/rome_js_analyze/src/semantic_analyzers/nursery/use_iframe_title.rs
Outdated
Show resolved
Hide resolved
crates/rome_js_analyze/src/semantic_analyzers/nursery/use_iframe_title.rs
Show resolved
Hide resolved
Some( | ||
RuleDiagnostic::new( | ||
rule_category!(), | ||
state.node.syntax().text_trimmed_range(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like state.node
is always set to the query node, in this case you don't need to clone it into the state and can simply retrieve it in the diagnostic
method by calling ctx.query()
(then you can just use ()
as the signal type)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I've done at 8100a2c.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once we address the feedback, I think we can merge the PR
|
||
3 │ <iframe /> | ||
4 │ <iframe></iframe> | ||
> 5 │ <iframe {...props} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This case should not trigger the rule. props
might contain title
, we don't know that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I've fixed it at 8100a2c.
imho, this behavior will be different from ESLint.
jsx-eslint/eslint-plugin-jsx-a11y@main/docs/rules/iframe-has-title.md
author unvalley <kirohi.code@gmail.com> 1671288906 +0900 committer unvalley <kirohi.code@gmail.com> 1671554652 +0900 feat(rome_js_analyze): useIframeTitle docs: website chore: delete waste file refactor: remove waste node declaration chore: add configurations refactor: remove missing_prop and edit message
docs: update useIframeTitle.md chore: codegen chore: cargo fmt
chore: cargo fmt chore: codegen stuff chore: cargo fmt
Summary
Closes #3945
Test Plan
cargo test -p rome_js_analyze -- use_iframe_title
Documentation
cargo lintdoc
[ ] I will create a new PR to update the documentation