Skip to content

Commit 0b6074f

Browse files
committed
exhaustive-deps: Add passing test for generic type arguments
1 parent 9ffe910 commit 0b6074f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7774,6 +7774,16 @@ const testsTypescript = {
77747774
}
77757775
`,
77767776
},
7777+
{
7778+
code: normalizeIndent`
7779+
function useMyThing<T>(): void {
7780+
useEffect(() => {
7781+
let foo: T;
7782+
console.log(foo);
7783+
}, []);
7784+
}
7785+
`,
7786+
},
77777787
],
77787788
invalid: [
77797789
{

0 commit comments

Comments
 (0)