From 45aae2e4e92fa40966f7260436a5fd6e8e421115 Mon Sep 17 00:00:00 2001 From: Gertjan van Oosten Date: Fri, 26 Apr 2019 14:21:33 +0200 Subject: [PATCH] Disable eslint's react/no-did-update-set-state check 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: https://github.com/yannickcr/eslint-plugin-react/issues/1754 --- client/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/package.json b/client/package.json index b4d3acb8d1..1c6464f355 100644 --- a/client/package.json +++ b/client/package.json @@ -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",