An ESLint plugin for React JSX rules, part of the eslint-react monorepo. The current stable version is v4.2.3, requiring Node.js >=22.0.0 and ESLint ^10.0.0 with TypeScript. It provides fine-grained control over JSX syntax and patterns beyond what eslint-plugin-react offers, with strong TypeScript support and custom rule examples. Note: the project has moved to v5.x beta releases with breaking changes – stick to v4.x for stability.
npm install eslint-plugin-react-jsxVerified import paths — ran on the pinned version, not inferred.
Flat ESLint config using the plugin with two recommended JSX rules.
Upgrade Node to >=22.0.0 and ESLint to ^10.0.0.
Remove the rule from your config; use eslint-plugin-react-hooks equivalent instead.
Use `import()` or ensure your project is ESM.
Install TypeScript as a peer dependency and enable linting with `parserOptions.project`.
Run `npm install eslint-plugin-react-jsx --save-dev`.
Use `import plugin from 'eslint-plugin-react-jsx'` or `const plugin = (await import('eslint-plugin-react-jsx')).default`.Set `"type": "module"` in package.json or use `.mjs` extension for config file.