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.

  • 20/38 recommended rules are remaining as TODO
    • 1 of which have pending fixes
  • 55/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 register the rule in crates/oxc_linter/src/rules.rs and also declare_all_lint_rules at the bottom.

Recommended rules

✅: 18, 🚫: 0, ⏳: 1 / total: 38
Status Name
react/component-hook-factories
react/config
react/display-name
react/error-boundaries
react/exhaustive-deps
react/gating
react/globals
react/immutability
react/incompatible-library
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
react/jsx-uses-vars
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/prop-types
react/purity
react/react-in-jsx-scope
react/refs
react/require-render-return
react/rules-of-hooks
react/set-state-in-effect
react/set-state-in-render
react/static-components
react/unsupported-syntax
react/use-memo

✅ = Implemented, 🚫 = No need to implement, ⏳ = Fix pending

Not recommended rules

✅: 29, 🚫: 8, ⏳: 3 / total: 92
Status Name
react/automatic-effect-dependencies
react/boolean-prop-naming
react/button-has-type
react/capitalized-calls
react/checked-requires-onchange-or-readonly
react/default-props-match-prop-types
react/destructuring-assignment
react/fbt
react/fire
react/forbid-component-props
react/forbid-dom-props
react/forbid-elements
react/forbid-foreign-prop-types
react/forbid-prop-types
react/forward-ref-uses-ref
react/function-component-definition
react/hook-use-state
react/hooks
✅⏳ react/iframe-missing-sandbox
react/invariant
react/jsx-boolean-value
react/jsx-child-element-spacing
react/jsx-closing-bracket-location
react/jsx-closing-tag-location
react/jsx-curly-brace-presence
react/jsx-curly-newline
🚫 react/jsx-curly-spacing
🚫 react/jsx-equals-spacing
✅⏳ react/jsx-filename-extension
react/jsx-first-prop-new-line
react/jsx-fragments
react/jsx-handler-names
🚫 react/jsx-indent
🚫 react/jsx-indent-props
react/jsx-max-depth
react/jsx-max-props-per-line
🚫 react/jsx-newline
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
react/jsx-pascal-case
🚫 react/jsx-props-no-multi-spaces
react/jsx-props-no-spread-multi
react/jsx-props-no-spreading
react/jsx-sort-props
🚫 react/jsx-tag-spacing
🚫 react/jsx-wrap-multilines
react/memoized-effect-dependencies
react/no-access-state-in-setstate
react/no-adjacent-inline-elements
react/no-array-index-key
react/no-arrow-function-lifecycle
react/no-danger
react/no-deriving-state-in-effects
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
react/no-unused-prop-types
react/no-unused-state
react/no-will-update-set-state
react/prefer-es6-class
react/prefer-exact-props
react/prefer-read-only-props
react/prefer-stateless-function
react/require-default-props
react/require-optimization
react/rule-suppression
react/self-closing-comp
react/sort-comp
react/sort-default-props
react/sort-prop-types
react/state-in-constructor
react/static-property-placement
react/style-prop-object
react/syntax
react/todo
react/void-dom-elements-no-children
react/void-use-memo

✅ = Implemented, 🚫 = No need to implement, ⏳ = Fix pending

Deprecated rules

✅: 0, 🚫: 2, ⏳: 0 / total: 2
Status Name
🚫 react/jsx-sort-default-props
🚫 react/jsx-space-before-closing

✅ = Implemented, 🚫 = No need 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