diff --git a/package.json b/package.json index dc70a4a..479f956 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,10 @@ "jest": true }, "rules": { - "semi": ["error", "never"] + "semi": [ + "error", + "never" + ] } } } diff --git a/packages/eslint-config-react/__snapshots__/index.test.js.snap b/packages/eslint-config-react/__snapshots__/index.test.js.snap index 77131c5..769fa0d 100644 --- a/packages/eslint-config-react/__snapshots__/index.test.js.snap +++ b/packages/eslint-config-react/__snapshots__/index.test.js.snap @@ -1972,6 +1972,7 @@ Object { }, ], "radix": "error", + "react-hooks/exhaustive-deps": "warn", "react-hooks/rules-of-hooks": "error", "react/display-name": 2, "react/jsx-key": 2, diff --git a/packages/eslint-config-react/index.js b/packages/eslint-config-react/index.js index fd6968d..cb7a6bb 100644 --- a/packages/eslint-config-react/index.js +++ b/packages/eslint-config-react/index.js @@ -2,6 +2,7 @@ module.exports = { extends: ['plugin:react/recommended', '@zonedigital/eslint-config-zone'], plugins: ['react-hooks'], rules: { + 'react-hooks/exhaustive-deps': 'warn', 'react-hooks/rules-of-hooks': 'error', }, } diff --git a/packages/eslint-config-react/package.json b/packages/eslint-config-react/package.json index f47be0d..3e4b66f 100644 --- a/packages/eslint-config-react/package.json +++ b/packages/eslint-config-react/package.json @@ -31,13 +31,13 @@ "eslint-plugin-compat": "^2.5.1", "eslint-plugin-import": "^2.14.0", "eslint-plugin-react": "^7.12.2", - "eslint-plugin-react-hooks": "^1.0.0" + "eslint-plugin-react-hooks": "^1.2.0" }, "peerDependencies": { "eslint": "^5.0.0", "eslint-plugin-compat": "^2.0.0", "eslint-plugin-import": "^2.0.0", "eslint-plugin-react": "^7.0.0", - "eslint-plugin-react-hooks": "^1.0.0" + "eslint-plugin-react-hooks": "^1.2.0" } } diff --git a/yarn.lock b/yarn.lock index ddda000..d203d96 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2143,10 +2143,10 @@ eslint-plugin-import@^2.14.0: read-pkg-up "^2.0.0" resolve "^1.6.0" -eslint-plugin-react-hooks@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-1.0.1.tgz#76b6fb4edafab02eab0090078977687157605dd9" - integrity sha512-yNhvY7EFBp0mq0Bt8BHoS57GwJ4e1qSYdvDFSfPnjmiSmyGUfQFQGcQs4K0JQFDGopWkURWq58psbUJIhWZ2Kg== +eslint-plugin-react-hooks@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-1.2.0.tgz#a1c78e792b8d7d3e9c2a2aad28df80b9b5cd1101" + integrity sha512-pb/pwyHg0K3Ss/8loSwCGRSXIsvPBHWfzcP/6jeei0SgWBOyXRbcKFpGxolg0xSmph0jQKLyM27B74clbZM/YQ== eslint-plugin-react@^7.12.2: version "7.12.2"