Skip to content

☂️ eslint-plugin-react #1022

@camc314

Description

@camc314

Warning

This comment is maintained by CI. Do not edit this comment directly.
To update comment template, see https://github.com/oxc-project/oxc/tree/main/tasks/lint_rules

This is the tracking issue for eslint-plugin-react, eslint-plugin-react-hooks.

There are 130(+ 2 deprecated) rules.

  • 2/38 recommended rules are remaining as TODO
    • 3 of which have pending fixes
  • 16/92 not recommended rules are remaining as TODO
    • 3 of which have pending fixes

To get started, run the following command:

just new-react-rule <RULE_NAME>

Then implement the rule and get all the tests passing.

Recommended rules

✅: 19, 🚫: 17, ⏳: 3 / total: 38
Status Name Rationale
🚫 react/component-hook-factories 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/config 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/display-name
🚫 react/error-boundaries 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/exhaustive-deps
🚫 react/gating 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/globals 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/immutability 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/incompatible-library 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/jsx-key
react/jsx-no-comment-textnodes
react/jsx-no-duplicate-props
✅⏳ react/jsx-no-target-blank
react/jsx-no-undef
🚫 react/jsx-uses-react It is unnecessary to import React for JSX/TSX files with React 17+ when using the new JSX transform. This rule is also not easy to implement in Oxlint as it modifies the behavior of another rule.
🚫 react/jsx-uses-vars Handled by eslint/no-unused-vars, which already evaluates whether vars are used in JSX.
react/no-children-prop
react/no-danger-with-children
react/no-deprecated
react/no-direct-mutation-state
react/no-find-dom-node
react/no-is-mounted
react/no-render-return-value
react/no-string-refs
✅⏳ react/no-unescaped-entities
✅⏳ react/no-unknown-property
🚫 react/preserve-manual-memoization 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/prop-types
🚫 react/purity 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/react-in-jsx-scope
🚫 react/refs 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/require-render-return
react/rules-of-hooks
🚫 react/set-state-in-effect 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/set-state-in-render 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/static-components 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/unsupported-syntax 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/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.

✅ = Implemented, 🚫 = Not intending to implement, ⏳ = Fix pending

Not recommended rules

✅: 33, 🚫: 43, ⏳: 3 / total: 92
Status Name Rationale
🚫 react/automatic-effect-dependencies 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/boolean-prop-naming
react/button-has-type
🚫 react/capitalized-calls 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/checked-requires-onchange-or-readonly
🚫 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/destructuring-assignment
🚫 react/fbt 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/fire 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/forbid-component-props
react/forbid-dom-props
react/forbid-elements
🚫 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/forward-ref-uses-ref
react/function-component-definition
react/hook-use-state
🚫 react/hooks 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/iframe-missing-sandbox
🚫 react/invariant 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/jsx-boolean-value
🚫 react/jsx-child-element-spacing Stylistic rule from eslint-plugin-react. Should use Oxfmt for stylistic rules, or use JS Plugins to enable this rule.
🚫 react/jsx-closing-bracket-location Stylistic rule from eslint-plugin-react. Should use Oxfmt for stylistic rules, or use JS Plugins to enable this rule.
🚫 react/jsx-closing-tag-location Stylistic rule from eslint-plugin-react. Should use Oxfmt for stylistic rules, or use JS Plugins to enable this rule.
react/jsx-curly-brace-presence
🚫 react/jsx-curly-newline Stylistic rule from eslint-plugin-react. Should use Oxfmt for stylistic rules, or use JS Plugins to enable this rule.
🚫 react/jsx-curly-spacing Stylistic rule from eslint-plugin-react. Should use Oxfmt for stylistic rules, or use JS Plugins to enable this rule.
🚫 react/jsx-equals-spacing Stylistic rule from eslint-plugin-react. Should use Oxfmt for stylistic rules, or use JS Plugins to enable this rule.
✅⏳ react/jsx-filename-extension
🚫 react/jsx-first-prop-new-line Stylistic rule from eslint-plugin-react. Should use Oxfmt for stylistic rules, or use JS Plugins to enable this rule.
react/jsx-fragments
react/jsx-handler-names
🚫 react/jsx-indent Stylistic rule from eslint-plugin-react. Should use Oxfmt for stylistic rules, or use JS Plugins to enable this rule.
🚫 react/jsx-indent-props Stylistic rule from eslint-plugin-react. Should use Oxfmt for stylistic rules, or use JS Plugins to enable this rule.
react/jsx-max-depth
🚫 react/jsx-max-props-per-line Stylistic rule from eslint-plugin-react. Should use Oxfmt for stylistic rules, or use JS Plugins to enable this rule.
🚫 react/jsx-newline Stylistic rule from eslint-plugin-react. Should use Oxfmt for stylistic rules, or use JS Plugins to enable this rule.
react/jsx-no-bind
react/jsx-no-constructed-context-values
react/jsx-no-leaked-render
react/jsx-no-literals
✅⏳ react/jsx-no-script-url
react/jsx-no-useless-fragment
🚫 react/jsx-one-expression-per-line Stylistic rule from eslint-plugin-react. Should use Oxfmt for stylistic rules, or use JS Plugins to enable this rule.
react/jsx-pascal-case
🚫 react/jsx-props-no-multi-spaces Stylistic rule from eslint-plugin-react. Should use Oxfmt for stylistic rules, or use JS Plugins to enable this rule.
react/jsx-props-no-spread-multi
react/jsx-props-no-spreading
🚫 react/jsx-sort-props Stylistic rule from eslint-plugin-react. Should use Oxfmt for stylistic rules, or use JS Plugins to enable this rule.
🚫 react/jsx-tag-spacing Stylistic rule from eslint-plugin-react. Should use Oxfmt for stylistic rules, or use JS Plugins to enable this rule.
🚫 react/jsx-wrap-multilines Stylistic rule from eslint-plugin-react. Should use Oxfmt for stylistic rules, or use JS Plugins to enable this rule.
🚫 react/memoized-effect-dependencies 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/no-access-state-in-setstate This rule only applies to legacy class components, which are not widely used in modern React.
🚫 react/no-adjacent-inline-elements Stylistic rule from eslint-plugin-react. Should use Oxfmt for stylistic rules, or use JS Plugins to enable this rule.
react/no-array-index-key
react/no-arrow-function-lifecycle
react/no-danger
🚫 react/no-deriving-state-in-effects 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/no-did-mount-set-state
react/no-did-update-set-state
react/no-invalid-html-attribute
react/no-multi-comp
react/no-namespace
react/no-object-type-as-default-prop
react/no-redundant-should-component-update
react/no-set-state
react/no-this-in-sfc
react/no-typos
react/no-unsafe
react/no-unstable-nested-components
🚫 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-prop-types PropTypes are ignored in React 19, and TypeScript + the no-unused-vars rule already catches unused props in most cases.
🚫 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-will-update-set-state
react/prefer-es6-class
🚫 react/prefer-exact-props This rule is not relevant for TypeScript code, and PropTypes are ignored in React 19.
🚫 react/prefer-read-only-props This rule is niche and primarily applies to legacy class components, which are not widely used in modern React.
react/prefer-stateless-function
react/require-default-props
🚫 react/require-optimization This rule only applies to legacy class components, which are not widely used in modern React.
🚫 react/rule-suppression 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/self-closing-comp
🚫 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/state-in-constructor
🚫 react/static-property-placement This rule only applies to legacy class components, which are not widely used in modern React.
react/style-prop-object
🚫 react/syntax 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/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-dom-elements-no-children
🚫 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.

✅ = Implemented, 🚫 = Not intending to implement, ⏳ = Fix pending

Deprecated rules

✅: 0, 🚫: 2, ⏳: 0 / total: 2
Status Name Rationale
🚫 react/jsx-sort-default-props Replaced by react/sort-default-props.
🚫 react/jsx-space-before-closing Stylistic rule from eslint-plugin-react. Should use Oxfmt for stylistic rules, or use JS Plugins to enable this rule.

✅ = Implemented, 🚫 = Not intending to implement, ⏳ = Fix pending

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linterArea - LinterE-Help WantedExperience level - For the experienced collaborators

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions