{"id":19891,"library":"eslint-plugin-react-dom","title":"eslint-plugin-react-dom","description":"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.","status":"active","version":"4.2.3","language":"javascript","source_language":"en","source_url":"https://github.com/Rel1cx/eslint-react","tags":["javascript","react","dom","eslint","eslint-react","eslint-plugin","eslint-plugin-react-dom","typescript"],"install":[{"cmd":"npm install eslint-plugin-react-dom","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-react-dom","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-react-dom","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency: ESLint ^10.0.0 required","package":"eslint","optional":false},{"reason":"Peer dependency: TypeScript is required (though specified as '*', needed for type checking if rules use type information)","package":"typescript","optional":true}],"imports":[{"note":"ESM only since v4; require() fails in Node 22+.","wrong":"const plugin = require('eslint-plugin-react-dom')","symbol":"default","correct":"import plugin from 'eslint-plugin-react-dom'"},{"note":"Access individual rule implementations as an object.","wrong":"","symbol":"rules","correct":"import { rules } from 'eslint-plugin-react-dom'"},{"note":"configs is a named export, not a default export from a subpath.","wrong":"import configs from 'eslint-plugin-react-dom/configs'","symbol":"configs","correct":"import { configs } from 'eslint-plugin-react-dom'"}],"quickstart":{"code":"// eslint.config.js\nimport pluginReactDom from 'eslint-plugin-react-dom';\n\nexport default [\n  {\n    plugins: {\n      'react-dom': pluginReactDom,\n    },\n    rules: {\n      'react-dom/no-dangerously-set-innerhtml': 'error',\n      'react-dom/no-missing-iframe-sandbox': 'warn',\n    },\n  },\n];","lang":"javascript","description":"Configures the plugin with two DOM-specific rules in an ESLint flat config file."},"warnings":[{"fix":"Update Node to v22+ or stay on plugin v3.x if using older Node.","message":"Node >=22.0.0 required; plugin will not load on older versions.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Use ESLint 10+ with flat config (eslint.config.js).","message":"ESLint ^10.0.0 required; flat config only.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Convert project to ESM or use dynamic import() instead of require().","message":"ESM-only package; require() will throw ERR_REQUIRE_ESM.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Pin to v4 for stable rules; v5 may have renamed or removed rules.","message":"v5 series is in beta with breaking changes; v4 is still stable.","severity":"deprecated","affected_versions":"<5.0.0"},{"fix":"Ensure TypeScript is installed and parser configured for type-aware rules.","message":"Rules may require type information; not all work without TypeScript.","severity":"gotcha","affected_versions":">=4.0.0"}],"env_vars":null,"search_vec":"'10.0.0':33 '22.0.0':30 '4.2.3':27 '5.5.1':61 'activ':85 'applic':45 'best':41 'beta':60,88 'beta.0':62 'break':64 'broader':78 'cadenc':83 'chang':65 'current':23 'differenti':71 'dom':5,12,39,75,92,104 'dom-rel':38 'dom-specif':11 'eslint':2,7,20,32,80,93,95,98,101 'eslint-plugin':97 'eslint-plugin-react-dom':1,100 'eslint-react':19,94 'focus':72 'frequent':87 'javascript':90 'key':70 'latest':55 'lint':14 'monorepo':22 'node':29 'note':52 'packag':47 'part':16 'plugin':3,8,81,99,102 'practic':42 'provid':35 'react':4,10,21,44,79,91,96,103 'relat':40 'releas':56,82 'requir':28 'rule':15,36,76 'ship':48 'sole':73 'specif':13 'stabl':24 'track':69 'type':51 'typescript':50,105 'unlik':77 'updat':89 'v5':59,68 'version':25","created_at":"2026-04-25T11:20:13.465005+00:00","updated_at":"2026-04-25T11:20:13.465005+00:00","problems":[{"fix":"Change to import statement or use dynamic import().","cause":"Using CommonJS require() on an ESM-only package.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module not supported"},{"fix":"Upgrade ESLint to ^10.0.0.","cause":"Installed ESLint version is lower than 10.","error":"Failed to load plugin 'react-dom': Package requires eslint ^10.0.0"},{"fix":"Add plugin to plugins object: plugins: { 'react-dom': pluginReactDom }.","cause":"Plugin not registered properly in flat config.","error":"TypeError: Cannot read properties of undefined (reading 'no-dangerously-set-innerhtml')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/Rel1cx/eslint-react","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/eslint-plugin-react-dom","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}