From d2eed48d724004735ade8e0d5fc6cdf4ca88f21e Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Wed, 19 Oct 2022 14:54:02 -0400 Subject: [PATCH] s/wrapped in/returned from/ --- .../__tests__/ESLintRuleExhaustiveDeps-test.js | 2 +- packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js b/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js index f51384b4db875..2de2daa85d656 100644 --- a/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js +++ b/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js @@ -7663,7 +7663,7 @@ if (__EXPERIMENTAL__) { errors: [ { message: - 'Functions wrapped in `useEvent` must not be included in the dependency array. ' + + 'Functions returned from `useEvent` must not be included in the dependency array. ' + 'Remove `onStuff` from the list.', suggestions: [ { diff --git a/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js b/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js index 2217200f12a50..0885d268367f8 100644 --- a/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js +++ b/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js @@ -649,7 +649,7 @@ export default { reportProblem({ node: declaredDependencyNode, message: - 'Functions wrapped in `useEvent` must not be included in the dependency array. ' + + 'Functions returned from `useEvent` must not be included in the dependency array. ' + `Remove \`${context.getSource( declaredDependencyNode, )}\` from the list.`,