From 63a57ef388f94771f07788f78329bc6c8927872b Mon Sep 17 00:00:00 2001 From: Finn Terdal Date: Thu, 28 Jun 2018 14:51:25 -0500 Subject: [PATCH] disables rules about setState in didmount and didupdate --- rules/react.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rules/react.js b/rules/react.js index b15ebbc..5aadd41 100644 --- a/rules/react.js +++ b/rules/react.js @@ -39,8 +39,8 @@ module.exports = { 'react/no-danger': 1, // Prevent usage of dangerous JSX properties 'react/no-danger-with-children': 1, // Prevent problem with children and props.dangerouslySetInnerHTML 'react/no-deprecated': 1, // Prevent usage of deprecated methods - 'react/no-did-mount-set-state': 1, // Prevent usage of setState in componentDidMount - 'react/no-did-update-set-state': 1, // Prevent usage of setState in componentDidUpdate + 'react/no-did-mount-set-state': 0, // Prevent usage of setState in componentDidMount + 'react/no-did-update-set-state': 0, // Prevent usage of setState in componentDidUpdate 'react/no-direct-mutation-state': 2, // Prevent direct mutation of this.state 'react/no-find-dom-node': 1, // Prevent usage of findDOMNode 'react/no-is-mounted': 1, // Prevent usage of isMounted