{}} />
///```
+ ///
+ /// ```jsx,
+ /// {}} {...spread}>
+ /// ```
pub(crate) UseKeyWithClickEvents {
version: "10.0.0",
name: "useKeyWithClickEvents",
diff --git a/crates/rome_js_analyze/src/analyzers/nursery/use_valid_anchor.rs b/crates/rome_js_analyze/src/analyzers/nursery/use_valid_anchor.rs
index 8cd3fafe8642..3ece30e1dc16 100644
--- a/crates/rome_js_analyze/src/analyzers/nursery/use_valid_anchor.rs
+++ b/crates/rome_js_analyze/src/analyzers/nursery/use_valid_anchor.rs
@@ -235,15 +235,10 @@ impl Rule for UseValidAnchor {
(None, Some(on_click_attribute)) => Some(UseValidAnchorState::CantBeAnchor(
on_click_attribute.syntax().text_trimmed_range(),
)),
- (None, None) => {
- if !node.has_spread_attribute()? {
- Some(UseValidAnchorState::MissingHrefAttribute(
- node.syntax().text_trimmed_range(),
- ))
- } else {
- None
- }
- }
+ (None, None) if !node.has_spread_attribute()? => Some(
+ UseValidAnchorState::MissingHrefAttribute(node.syntax().text_trimmed_range()),
+ ),
+ _ => None,
}
}
diff --git a/website/src/docs/lint/rules/useBlankTarget.md b/website/src/docs/lint/rules/useBlankTarget.md
index 146b1fd1322a..573c14c7aea8 100644
--- a/website/src/docs/lint/rules/useBlankTarget.md
+++ b/website/src/docs/lint/rules/useBlankTarget.md
@@ -58,6 +58,26 @@ and the [the noopener documentation](https://html.spec.whatwg.org/multipage/link
│ +++++++++++
{% endraw %}
+```jsx
+child
+```
+
+{% raw %}nursery/useBlankTarget.js:1:43 lint/nursery/useBlankTarget FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ ⚠ Avoid using target="_blank" without rel="noreferrer".
+
+ > 1 │ <a {...props} href='http://external.link' target='_blank' rel="noopener">child</a>
+ │ ^^^^^^^^^^^^^^^
+ 2 │
+
+ ℹ Opening external links in new tabs without rel="noreferrer" is a security risk. See the explanation for more details.
+
+ ℹ Safe fix: Add the "noreferrer" to the existing attribute.
+
+ 1 │ <a·{...props}·href='http://external.link'·target='_blank'·rel="noreferrer·noopener">child</a>
+ │ +++++++++++
+
{% endraw %}
+
```jsx
// case-insensitive
child
@@ -83,6 +103,7 @@ and the [the noopener documentation](https://html.spec.whatwg.org/multipage/link
### Valid
```jsx
-child
+let a = child;
+let a = child;
```
diff --git a/website/src/docs/lint/rules/useKeyWithClickEvents.md b/website/src/docs/lint/rules/useKeyWithClickEvents.md
index 1917777c5e46..dc8b5e70a789 100644
--- a/website/src/docs/lint/rules/useKeyWithClickEvents.md
+++ b/website/src/docs/lint/rules/useKeyWithClickEvents.md
@@ -78,3 +78,7 @@ Enforce to have the `onClick` mouse event with the `onKeyUp`, the `onKeyDown`, o
{}} />
```
+```jsx
+ {}} {...spread}>
+```
+