Skip to content
This repository was archived by the owner on Mar 7, 2019. It is now read-only.

feat: use react/forbid-dom-props #42

Merged
merged 1 commit into from
Nov 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions environments/react/recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -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. <div />) and not Components (e.g. <Component />).
'react/forbid-dom-props': ['error', { forbid: ['style', 'id'] }],
},
}
3 changes: 0 additions & 3 deletions unused.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down