An ESLint plugin for React DOM-specific linting rules, part of the @eslint-react monorepo. Current stable version is 4.2.3, requiring Node >=22.0.0 and ESLint ^10.0.0. It provides rules for DOM-related best practices in React applications. The package ships with TypeScript types. Note that the latest releases are in v5 beta (5.5.1-beta.0) with breaking changes on the v5 track. Key differentiator: focused solely on DOM rules, unlike broader React ESLint plugins. Release cadence is active with frequent beta updates.
npm install eslint-plugin-react-domVerified import paths — ran on the pinned version, not inferred.
Configures the plugin with two DOM-specific rules in an ESLint flat config file.
Update Node to v22+ or stay on plugin v3.x if using older Node.
Use ESLint 10+ with flat config (eslint.config.js).
Convert project to ESM or use dynamic import() instead of require().
Pin to v4 for stable rules; v5 may have renamed or removed rules.
Ensure TypeScript is installed and parser configured for type-aware rules.
Change to import statement or use dynamic import().
Upgrade ESLint to ^10.0.0.
Add plugin to plugins object: plugins: { 'react-dom': pluginReactDom }.