Skip to content

Commit

Permalink
Introduce linting rule warn about nested components (#4292)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonkoops authored Jan 31, 2023
1 parent 604ac21 commit 97339a6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ module.exports = {
"react/prop-types": "off",
// Prevent fragments from being added that have only a single child.
"react/jsx-no-useless-fragment": "error",
// Ban nesting components, as this will cause unintended re-mounting of components.
// TODO: All issues should be fixed and this rule should be set to "error".
"react/no-unstable-nested-components": ["warn", { allowAsProps: true }],
"prefer-arrow-callback": "error",
"prettier/prettier": [
"error",
Expand Down

0 comments on commit 97339a6

Please sign in to comment.