Skip to content

Commit

Permalink
Disable eslint's react/no-did-update-set-state check
Browse files Browse the repository at this point in the history
We use React >= 16.3, and everywhere we use setState in componentDidUpdate, we do that inside an if where we check against previous values. So the rule does not really apply to us.
See e.g. the discussion here: jsx-eslint/eslint-plugin-react#1754
  • Loading branch information
gjvoosten committed Apr 26, 2019
1 parent 3ea4d44 commit 45aae2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/package.json
Expand Up @@ -311,7 +311,7 @@
"react/jsx-indent-props": "warn",
"react/jsx-no-bind": "warn",
"react/jsx-tag-spacing": "warn",
"react/no-did-update-set-state": "warn",
"react/no-did-update-set-state": "off",
"react/no-unused-prop-types": "warn",
"react/prop-types": "warn",
"react/self-closing-comp": "warn",
Expand Down

0 comments on commit 45aae2e

Please sign in to comment.