From f8eea133a96f3e0b8522038874e55c1560762d6d 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 bde0c1cfa35e1..59b70f9146775 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: [ {