{"id":19888,"library":"eslint-plugin-react-19-upgrade","title":"eslint-plugin-react-19-upgrade","description":"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.","status":"active","version":"1.9.0","language":"javascript","source_language":"en","source_url":"https://github.com/brettfarrow/eslint-plugin-react-19-upgrade","tags":["javascript","eslint","eslintplugin","react"],"install":[{"cmd":"npm install eslint-plugin-react-19-upgrade","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-react-19-upgrade","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-react-19-upgrade","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency, required as the plugin host.","package":"eslint","optional":false}],"imports":[{"note":"ESM and CJS are both supported. Use default import for the plugin object.","wrong":"const react19Upgrade = require('eslint-plugin-react-19-upgrade');","symbol":"plugin (default)","correct":"import react19Upgrade from 'eslint-plugin-react-19-upgrade';"},{"note":"ESLint plugin naming convention: omit the eslint-plugin- prefix.","wrong":"\"plugins\": [\"eslint-plugin-react-19-upgrade\"]","symbol":"react-19-upgrade (plugin name in config)","correct":"\"plugins\": [\"react-19-upgrade\"]"},{"note":"Rules must be prefixed with the plugin short name.","wrong":"\"rules\": { \"no-default-props\": \"error\" }","symbol":"rules (config)","correct":"\"rules\": { \"react-19-upgrade/no-default-props\": \"error\" }"}],"quickstart":{"code":"// .eslintrc.json\n{\n  \"plugins\": [\"react-19-upgrade\"],\n  \"rules\": {\n    \"react-19-upgrade/no-default-props\": \"error\",\n    \"react-19-upgrade/no-prop-types\": \"warn\",\n    \"react-19-upgrade/no-legacy-context\": \"error\",\n    \"react-19-upgrade/no-string-refs\": \"error\",\n    \"react-19-upgrade/no-factories\": \"error\",\n    \"react-19-upgrade/no-legacy-react-dom\": \"error\",\n    \"react-19-upgrade/no-legacy-react-dom-server\": \"error\",\n    \"react-19-upgrade/no-legacy-test-utils-act\": \"error\"\n  }\n}","lang":"json","description":"Configures all available rules in .eslintrc.json to enforce React 19 upgrade patterns."},"warnings":[{"fix":"Use the codemod instead; no plugin rule available.","message":"The 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`","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use `createRoot` from `react-dom/client`.","message":"rule `no-legacy-react-dom` will flag `ReactDOM.render` and `ReactDOM.hydrate`; they are removed in React 19.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Use `renderToPipeableStream` (different API).","message":"rule `no-legacy-react-dom-server` flags `renderToNodeStream` and `renderToStaticNodeStream`; removed in React 19.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Import `act` from `react`.","message":"rule `no-legacy-test-utils-act` flags `act` from `react-dom/test-utils`; removed in React 19.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Review auto-fixed code manually for complex components.","message":"rule `no-default-props` fixable by ESLint but may not cover all edge cases (e.g., forwardRef components).","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run `npm install eslint-plugin-react-19-upgrade --save-dev` and ensure ESLint >=7.","cause":"Missing installation or wrong ESLint version (requires >=7.0.0).","error":"Error: Failed to load plugin 'react-19-upgrade' declared in '.eslintrc.json': Cannot find module 'eslint-plugin-react-19-upgrade'"},{"fix":"Use `react-19-upgrade/no-default-props` instead of `no-default-props` in rules config.","cause":"Rule name missing plugin prefix.","error":"Definition for rule 'no-default-props' was not found."},{"fix":"Ensure the parser is set to @typescript-eslint/parser for TypeScript files and target only React components.","cause":"The plugin internally expects a certain AST structure; may occur with non-React code or TypeScript without @typescript-eslint parser.","error":"TypeError: Cannot read properties of undefined (reading 'some')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}