diff --git a/crates/oxc_linter/src/rules/react/jsx_no_undef.rs b/crates/oxc_linter/src/rules/react/jsx_no_undef.rs index 7ef625c026bb3..7db49b2387f62 100644 --- a/crates/oxc_linter/src/rules/react/jsx_no_undef.rs +++ b/crates/oxc_linter/src/rules/react/jsx_no_undef.rs @@ -22,7 +22,10 @@ pub struct JsxNoUndef; declare_oxc_lint!( /// ### What it does /// - /// Disallow undeclared variables in JSX + /// Disallow undeclared variables in JSX. + /// + /// Note that this rule is generally unnecessary if you are using TypeScript, as + /// TypeScript will catch undeclared variables for you. /// /// ### Why is this bad? /// diff --git a/crates/oxc_linter/src/rules/react/no_string_refs.rs b/crates/oxc_linter/src/rules/react/no_string_refs.rs index d7dc65d256057..54cfb37e9716f 100644 --- a/crates/oxc_linter/src/rules/react/no_string_refs.rs +++ b/crates/oxc_linter/src/rules/react/no_string_refs.rs @@ -40,11 +40,14 @@ pub struct NoStringRefs { declare_oxc_lint!( /// ### What it does /// - /// This rule prevents using string literals in ref attributes. + /// This rule prevents using the deprecated behavior of string literals in ref attributes. /// /// ### Why is this bad? /// - /// Using string literals in ref attributes is deprecated in React. + /// Using string literals in ref attributes has been deprecated since React 16.3.0. + /// + /// String refs are [removed entirely in React 19](https://react.dev/blog/2024/04/25/react-19-upgrade-guide#removed-string-refs), + /// and so this rule can be disabled if on React 19+. /// /// ### Examples /// diff --git a/tasks/lint_rules/src/unsupported-rules.json b/tasks/lint_rules/src/unsupported-rules.json index 8718509cf3250..c94fe71bc0a04 100644 --- a/tasks/lint_rules/src/unsupported-rules.json +++ b/tasks/lint_rules/src/unsupported-rules.json @@ -103,6 +103,19 @@ "react/todo": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.", "react/void-use-memo": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.", + "react/default-props-match-prop-types": "This rule only applies to legacy class components, which are not widely used in modern React. Also stylistic.", + "react/forbid-foreign-prop-types": "PropTypes are ignored in React 19, and this rule is only relevant for very specific use-cases involving it.", + "react/forbid-prop-types": "PropTypes are ignored in React 19, and this rule is only relevant if you use the PropTypes package.", + "react/no-access-state-in-setstate": "This rule only applies to legacy class components, which are not widely used in modern React.", + "react/no-unused-class-component-methods": "This rule only applies to legacy class components, which are not widely used in modern React. It is also complex to implement.", + "react/no-unused-state": "This rule only applies to legacy class components, which are not widely used in modern React. It is also complex to implement.", + "react/no-unused-prop-types": "PropTypes are ignored in React 19, and TypeScript + the `no-unused-vars` rule already catches unused props in most cases.", + "react/prefer-exact-props": "This rule is not relevant for TypeScript code, and PropTypes are ignored in React 19.", + "react/sort-comp": "This rule only applies to legacy class components, which are not widely used in modern React. Also stylistic.", + "react/sort-default-props": "`defaultProps` is removed entirely in React 19, this rule is no longer relevant. Also stylistic.", + "react/sort-prop-types": "PropTypes are ignored in React 19, and this rule is only relevant if you use the PropTypes package. Also stylistic.", + "react/static-property-placement": "This rule only applies to legacy class components, which are not widely used in modern React.", + "typescript/sort-type-constituents": "Deprecated, replaced by `perfectionist/sort-intersection-types` and `perfectionist/sort-union-types` rules.", "typescript/no-type-alias": "Deprecated, replaced by `typescript-eslint/consistent-type-definitions` rule.", "typescript/typedef": "Deprecated.",