From 639b21ffdca65656f28be27b16820a8c4c5b799b 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 0c782dc25ae02..7fca90cc1c268 100644 --- a/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js +++ b/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js @@ -7580,6 +7580,15 @@ const testsTypescript = { } `, }, + { + code: normalizeIndent` + function useMyThing(): void { + useEffect(() => { + let foo: T; + }, []); + } + `, + }, ], invalid: [ {