Skip to content

[Rule Migration] migrate eslint-plugin-react rules #85

@Rel1cx

Description

@Rel1cx

Migration Status

Correctness and best practices rules

The following stylistic rules in eslint-plugin-react can be replaced by the same rules in @stylistic/eslint-plugin-jsx:

  • 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-first-prop-new-line
  • react/jsx-indent-props
  • react/jsx-indent
  • react/jsx-max-props-per-line
  • react/jsx-newline
  • react/jsx-one-expression-per-line
  • react/jsx-pascal-case
  • react/jsx-props-no-multi-spaces
  • react/jsx-sort-default-props
  • react/jsx-sort-props
  • react/jsx-space-before-closing
  • react/jsx-tag-spacing
  • react/jsx-wrap-multilines

The following correctness rules in eslint-plugin-react can be enforced by TypeScript with appropriate tsconfig.json settings:

  • react/jsx-no-duplicate-props
  • react/jsx-no-undef
  • react/jsx-uses-react
  • react/jsx-uses-vars
  • react/no-invalid-html-attribute
  • react/no-unescaped-entities -> No need when using @typescript-eslint/parser
  • react/no-unknown-property
  • react/style-prop-object
  • react/react-in-jsx-scope
  • react/require-render-return

Outdated or obsolete rules

These rules are considered outdated or obsolete. They are not going to be supported by this plugin.

  • react/default-props-match-prop-types
  • react/forbid-foreign-prop-types
  • react/forbid-prop-types
  • react/no-unused-prop-types
  • react/prefer-exact-props
  • react/prefer-es6-class
  • react/prefer-stateless-function
  • react/require-default-props
  • react/require-optimization
  • react/sort-default-props
  • react/sort-prop-types
  • react/state-in-constructor
  • react/static-property-placement
  • react/jsx-no-bind

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions