Upgrading eslint-plugin-react 3 to 4
Breaking3.16.1 → 4.3.0Breaking5New11Changed4Fixed19Other4
BreakingUpgrade verdict
5 breaking changes.
In plain terms
- You must now extend the recommended config to get the previous default rules, including jsx-uses-vars.
- The rule has a new name; the old name keeps working for now but warns.
- The jsx-quotes rule is gone; use the core ESLint rule instead.
- The display-name rule now treats transpiler-generated names as valid; set ignoreTranspilerName to restore the previous behavior.
Must act Top 3 of 5 that need code or config changes
What you must change
Breaking5
Adds a shareable config in place of the default configuration;
jsx-uses-vars is no longer enabled by default.jsx-uses-varsRenames
jsx-sort-prop-types to sort-prop-types; the old name still works but triggers a warning.jsx-sort-prop-typessort-prop-typesRemoves the deprecated
jsx-quotes rule.jsx-quotesdisplay-name now accepts the transpiler name by default; use ignoreTranspilerName for the old behavior.display-nameignoreTranspilerNameAdds static method support to
sort-comp; static methods must now be declared first.sort-comp