From 23578b7c4ecfd5ecddef03c7d136add89f78043c Mon Sep 17 00:00:00 2001 From: StyleShit <32631382+StyleShit@users.noreply.github.com> Date: Mon, 13 May 2024 08:54:02 +0300 Subject: [PATCH] Bug: False positives for `react-hooks/exhaustive-deps` (#61599) Unlinked contributors: StyleShit. Co-authored-by: ajitbohra Co-authored-by: Mamaduka --- packages/eslint-plugin/configs/react.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/configs/react.js b/packages/eslint-plugin/configs/react.js index 3562b0e70074b7..04e4341c720be2 100644 --- a/packages/eslint-plugin/configs/react.js +++ b/packages/eslint-plugin/configs/react.js @@ -37,7 +37,7 @@ module.exports = { 'react-hooks/exhaustive-deps': [ 'warn', { - additionalHooks: '(useSelect|useSuspenseSelect)', + additionalHooks: '^(useSelect|useSuspenseSelect)$', }, ], 'react-hooks/rules-of-hooks': 'error',