From 16dffb275e9401902780138464f6608bf729e406 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 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js b/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js index 5c3c64c173fa9..2d972550171fb 100644 --- a/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js +++ b/packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js @@ -1630,7 +1630,7 @@ const tests = { }, 1000); return () => clearInterval(id); }, [setCount]); - + return

{count}

; } `, @@ -7704,6 +7704,15 @@ const testsTypescript = { } `, }, + { + code: normalizeIndent` + function useMyThing(): void { + useEffect(() => { + let foo: T; + }, []); + } + `, + }, ], invalid: [ {