Registry / testing / eslint-plugin-react-19-upgrade

eslint-plugin-react-19-upgrade

JSON →
library1.9.0jsnpmunverified

An ESLint plugin to identify and fix breaking changes when upgrading React 18 to React 19. Current version 1.9.0, actively maintained with frequent releases. It provides rules covering deprecated patterns like defaultProps, propTypes, legacy context, string refs, factories, removed react-dom APIs, and test-utils.act. Differentiators: focused solely on React 18→19 migration, fixable rules, and compatibility with ESLint >=7. Not a general React linter, but a targeted upgrade helper.

npm install eslint-plugin-react-19-upgrade
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-REAC
E
eslint-plugin-react-19-upgrade
testingjavascriptv1.9.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

plugin (default)
import react19Upgrade from 'eslint-plugin-react-19-upgrade';
const react19Upgrade = require('eslint-plugin-react-19-upgrade');
ESM and CJS are both supported. Use default import for the plugin object.
react-19-upgrade (plugin name in config)
"plugins": ["react-19-upgrade"]
"plugins": ["eslint-plugin-react-19-upgrade"]
ESLint plugin naming convention: omit the eslint-plugin- prefix.
rules (config)
"rules": { "react-19-upgrade/no-default-props": "error" }
"rules": { "no-default-props": "error" }
Rules must be prefixed with the plugin short name.

Configures all available rules in .eslintrc.json to enforce React 19 upgrade patterns.

// .eslintrc.json { "plugins": ["react-19-upgrade"], "rules": { "react-19-upgrade/no-default-props": "error", "react-19-upgrade/no-prop-types": "warn", "react-19-upgrade/no-legacy-context": "error", "react-19-upgrade/no-string-refs": "error", "react-19-upgrade/no-factories": "error", "react-19-upgrade/no-legacy-react-dom": "error", "react-19-upgrade/no-legacy-react-dom-server": "error", "react-19-upgrade/no-legacy-test-utils-act": "error" } }
Debug
Known issues
gotchaThe plugin does not lint for `element.ref` access change (ref becomes a prop). Use the official React codemod: `npx codemod@latest react/19/replace-ref-access`
fix
Use the codemod instead; no plugin rule available.
affects: >=1.0.0
deprecatedrule `no-legacy-react-dom` will flag `ReactDOM.render` and `ReactDOM.hydrate`; they are removed in React 19.
fix
Use `createRoot` from `react-dom/client`.
affects: >=1.0.0
deprecatedrule `no-legacy-react-dom-server` flags `renderToNodeStream` and `renderToStaticNodeStream`; removed in React 19.
fix
Use `renderToPipeableStream` (different API).
affects: >=1.0.0
deprecatedrule `no-legacy-test-utils-act` flags `act` from `react-dom/test-utils`; removed in React 19.
fix
Import `act` from `react`.
affects: >=1.0.0
gotcharule `no-default-props` fixable by ESLint but may not cover all edge cases (e.g., forwardRef components).
fix
Review auto-fixed code manually for complex components.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Failed to load plugin 'react-19-upgrade' declared in '.eslintrc.json': Cannot find module 'eslint-plugin-react-19-upgrade'
Missing installation or wrong ESLint version (requires >=7.0.0).
fix
Run `npm install eslint-plugin-react-19-upgrade --save-dev` and ensure ESLint >=7.
Definition for rule 'no-default-props' was not found.
Rule name missing plugin prefix.
fix
Use `react-19-upgrade/no-default-props` instead of `no-default-props` in rules config.
TypeError: Cannot read properties of undefined (reading 'some')
The plugin internally expects a certain AST structure; may occur with non-React code or TypeScript without @typescript-eslint parser.
fix
Ensure the parser is set to @typescript-eslint/parser for TypeScript files and target only React components.
Upgrade
Version history
1.9.0latest on npm
Audit
Dependencies
eslintrequiredPeer dependency, required as the plugin host.
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-plugin-react-19-upgrade — npm install eslint-plugin-react-19-upgrade · libregistry