From 6c6ee10c6fd9e7bdefbbb32b6cd7d501c73bc095 Mon Sep 17 00:00:00 2001 From: eps1lon Date: Fri, 11 Dec 2020 07:13:37 +0100 Subject: [PATCH] exhaustive-deps: Add passing test for generic type arguments --- .../__tests__/ESLintRuleExhaustiveDeps-test.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js b/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js index 430e78562491d..d21b09263dbc1 100644 --- a/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js +++ b/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js @@ -7646,6 +7646,15 @@ const testsTypescript = { } `, }, + { + code: normalizeIndent` + function useMyThing(): void { + useEffect(() => { + let foo: T; + }, []); + } + `, + }, ], invalid: [ {