Skip to content

Commit 6c6ee10

Browse files
committed
exhaustive-deps: Add passing test for generic type arguments
1 parent 782f689 commit 6c6ee10

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
@@ -7646,6 +7646,15 @@ const testsTypescript = {
76467646
}
76477647
`,
76487648
},
7649+
{
7650+
code: normalizeIndent`
7651+
function useMyThing<T>(): void {
7652+
useEffect(() => {
7653+
let foo: T;
7654+
}, []);
7655+
}
7656+
`,
7657+
},
76497658
],
76507659
invalid: [
76517660
{

0 commit comments

Comments
 (0)