From cb0764eeb0951ca8f837c208c6853d66f1ef55cf Mon Sep 17 00:00:00 2001 From: Micha Reiser Date: Wed, 10 Feb 2021 07:40:46 -0800 Subject: [PATCH] Upgrade react-hooks rules Summary: Upgrades the `react-hooks` eslint-rules to `4.2.0` Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D26366235 fbshipit-source-id: 04628e8f2a6c56eacba516d877df143c6c81adb8 --- Libraries/Components/TextInput/TextInput.js | 2 ++ repo-config/package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index 0e4c7faf3f63b0..261e11b82b59d8 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -842,6 +842,8 @@ function InternalTextInput(props: Props): React.Node { // Therefore, we ignore selections and pass them through until the selection event has // been sent. // Note that this mitigation is NOT needed for Fabric. + // discovered when upgrading react-hooks + // eslint-disable-next-line react-hooks/exhaustive-deps let selection: ?Selection = props.selection == null ? null diff --git a/repo-config/package.json b/repo-config/package.json index 03e90b72951810..53e9886ed5ad1e 100644 --- a/repo-config/package.json +++ b/repo-config/package.json @@ -30,7 +30,7 @@ "eslint-plugin-jsx-a11y": "6.2.1", "eslint-plugin-prettier": "2.6.2", "eslint-plugin-react": "7.21.5", - "eslint-plugin-react-hooks": "^4.0.7", + "eslint-plugin-react-hooks": "^4.2.0", "eslint-plugin-react-native": "3.10.0", "eslint-plugin-relay": "1.8.1", "flow-bin": "^0.144.0", diff --git a/yarn.lock b/yarn.lock index caa5dd23434482..40fa0c654a543d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2632,10 +2632,10 @@ eslint-plugin-prettier@2.6.2: fast-diff "^1.1.1" jest-docblock "^21.0.0" -eslint-plugin-react-hooks@^4.0.7: - version "4.0.7" - resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.0.7.tgz#19f9e3d07dd3a0fb9e6f0f07153707feedea8108" - integrity sha512-5PuW2OMHQyMLr/+MqTluYN3/NeJJ1RuvmEp5TR9Xl2gXKxvcusUZuMz8XBUtbELNaiRYWs693LQs0cljKuuHRQ== +eslint-plugin-react-hooks@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.2.0.tgz#8c229c268d468956334c943bb45fc860280f5556" + integrity sha512-623WEiZJqxR7VdxFCKLI6d6LLpwJkGPYKODnkH3D7WpOG5KM8yWueBd8TLsNAetEJNF5iJmolaAKO3F8yzyVBQ== eslint-plugin-react-native-globals@^0.1.1: version "0.1.2"