Skip to content

Commit 639b21f

Browse files
committed
exhaustive-deps: Add passing test for generic type arguments
1 parent cdfde3a commit 639b21f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7580,6 +7580,15 @@ const testsTypescript = {
75807580
}
75817581
`,
75827582
},
7583+
{
7584+
code: normalizeIndent`
7585+
function useMyThing<T>(): void {
7586+
useEffect(() => {
7587+
let foo: T;
7588+
}, []);
7589+
}
7590+
`,
7591+
},
75837592
],
75847593
invalid: [
75857594
{

0 commit comments

Comments
 (0)