Skip to content

Upgrading eslint-plugin-react 4 to 5

Breaking4.3.0 → 5.2.2Breaking4New13Changed5Fixed20Other3

BreakingUpgrade verdict

4 breaking changes.

  • The plugin no longer warns about SVG attributes.
  • Rules now assume React 15. If you still use React 0.14, set the React version to 0.14 in the shared settings.
  • The no-deprecated rule now flags more React APIs that React 15 deprecates.
  • The prefer-stateless-function rule now accepts components that return null.
Top 3 of 4 that need code or config changes

Adds doctrine ^1.2.2, jsx-ast-utils ^1.2.1.

Installs 4 packages in all (was 0).

Breaking4
Removes SVG attributes warnings.
Changes default rule behavior to React 15; set the React version to 0.14 in shared settings to keep the old behavior.
Updates rules for React 15, adding no-deprecated warnings for LinkedStateMixin, ReactPerf.printDOM and ReactPerf.getMeasurementsSummaryMap.
no-deprecatedLinkedStateMixinReactPerf.printDOMReactPerf.getMeasurementsSummaryMap
Allows stateless components to return null in prefer-stateless-function.
prefer-stateless-function