diff --git a/environments/react/recommended.js b/environments/react/recommended.js index 89831d8..9efa50e 100644 --- a/environments/react/recommended.js +++ b/environments/react/recommended.js @@ -262,5 +262,10 @@ module.exports = { // Invariant Violation: img is a void element tag and must neither have children nor use // dangerouslySetInnerHTML 'react/void-dom-elements-no-children': 'error', + + // Forbid certain props on DOM Nodes + // This rule checks all JSX elements and verifies that no forbidden props are used on DOM Nodes. + // This rule only applies to DOM Nodes (e.g.
) and not Components (e.g. ). + 'react/forbid-dom-props': ['error', { forbid: ['style', 'id'] }], }, } diff --git a/unused.js b/unused.js index eeb0cd1..5744a84 100644 --- a/unused.js +++ b/unused.js @@ -168,9 +168,6 @@ module.exports = { // Forbid certain props on Components 'react/forbid-component-props': 0, - // Forbid certain props on DOM Nodes - 'react/forbid-dom-props': 0, - // Enforce React components to have a shouldComponentUpdate method 'react/require-optimization': 0,