Registry / testing / eslint-plugin-react-dom

eslint-plugin-react-dom

JSON →
library4.2.3jsnpmunverified

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-dom
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-REAC
E
eslint-plugin-react-dom
testingjavascriptv4.2.3
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
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 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

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

default
✓ import plugin from 'eslint-plugin-react-dom'
✗ const plugin = require('eslint-plugin-react-dom')
ESM only since v4; require() fails in Node 22+.
rules
✓ import { rules } from 'eslint-plugin-react-dom'
Access individual rule implementations as an object.
configs
✓ import { configs } from 'eslint-plugin-react-dom'
✗ import configs from 'eslint-plugin-react-dom/configs'
configs is a named export, not a default export from a subpath.

Configures the plugin with two DOM-specific rules in an ESLint flat config file.

// eslint.config.js import pluginReactDom from 'eslint-plugin-react-dom'; export default [ { plugins: { 'react-dom': pluginReactDom, }, rules: { 'react-dom/no-dangerously-set-innerhtml': 'error', 'react-dom/no-missing-iframe-sandbox': 'warn', }, }, ];
Debug
Known issues
breakingNode >=22.0.0 required; plugin will not load on older versions.
fix
Update Node to v22+ or stay on plugin v3.x if using older Node.
affects: >=4.0.0
breakingESLint ^10.0.0 required; flat config only.
fix
Use ESLint 10+ with flat config (eslint.config.js).
affects: >=4.0.0
breakingESM-only package; require() will throw ERR_REQUIRE_ESM.
fix
Convert project to ESM or use dynamic import() instead of require().
affects: >=4.0.0
deprecatedv5 series is in beta with breaking changes; v4 is still stable.
fix
Pin to v4 for stable rules; v5 may have renamed or removed rules.
affects: <5.0.0
gotchaRules may require type information; not all work without TypeScript.
fix
Ensure TypeScript is installed and parser configured for type-aware rules.
affects: >=4.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module not supported
Using CommonJS require() on an ESM-only package.
fix
Change to import statement or use dynamic import().
Failed to load plugin 'react-dom': Package requires eslint ^10.0.0
Installed ESLint version is lower than 10.
fix
Upgrade ESLint to ^10.0.0.
TypeError: Cannot read properties of undefined (reading 'no-dangerously-set-innerhtml')
Plugin not registered properly in flat config.
fix
Add plugin to plugins object: plugins: { 'react-dom': pluginReactDom }.
Upgrade
Version history
4.2.3latest on npm
Audit
Dependencies
eslintrequiredPeer dependency: ESLint ^10.0.0 required
typescriptoptionalPeer dependency: TypeScript is required (though specified as '*', needed for type checking if rules use type information)
Agent activity
4 hits · last 30 days
node
4
Resources
eslint-plugin-react-dom — npm install eslint-plugin-react-dom · libregistry