From 90e3fc55db4bf6fd255e0021af7f23fa3b89e973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pedro=20Schmitz?= Date: Wed, 18 Feb 2026 16:28:48 -0300 Subject: [PATCH 1/2] fix(linter/react/no-unknown-property): add missing `fetchPriority` prop --- .../oxc_linter/src/rules/react/no_unknown_property.rs | 10 ++++++++++ .../src/snapshots/react_no_unknown_property.snap | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/crates/oxc_linter/src/rules/react/no_unknown_property.rs b/crates/oxc_linter/src/rules/react/no_unknown_property.rs index 2a28f3f8185c2..0c6ba2e1a2e1e 100644 --- a/crates/oxc_linter/src/rules/react/no_unknown_property.rs +++ b/crates/oxc_linter/src/rules/react/no_unknown_property.rs @@ -108,6 +108,8 @@ const ATTRIBUTE_TAGS_MAP: Map<&'static str, Set<&'static str>> = phf_map! { "displaystyle" => phf_set! {"math"}, // https://html.spec.whatwg.org/multipage/links.html#downloading-resources "download" => phf_set! {"a", "area"}, + // https://html.spec.whatwg.org/multipage/urls-and-fetching.html#fetch-priority-attributes + "fetchPriority" => phf_set! {"img", "link", "script"}, "fill" => phf_set! { // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill // Fill color @@ -340,6 +342,7 @@ const DOM_ATTRIBUTES_TO_CAMEL: Map<&'static str, &'static str> = phf_map! { "class" => "className", "http-equiv" => "httpEquiv", "crossorigin" => "crossOrigin", + "fetchpriority" => "fetchPriority", "for" => "htmlFor", "nomodule" => "noModule", "popovertarget" => "popoverTarget", @@ -692,6 +695,12 @@ fn test() { r#""#, None, ), + // https://html.spec.whatwg.org/multipage/urls-and-fetching.html#fetch-priority-attributes + (r#""#, None), + (r#""#, None), + (r#""#, None), + (r#""#, None), + (r#"