Skip to content

Commit 16dffb2

Browse files
committed
exhaustive-deps: Add passing test for generic type arguments
1 parent 4cd788a commit 16dffb2

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1630,7 +1630,7 @@ const tests = {
16301630
}, 1000);
16311631
return () => clearInterval(id);
16321632
}, [setCount]);
1633-
1633+
16341634
return <h1>{count}</h1>;
16351635
}
16361636
`,
@@ -7704,6 +7704,15 @@ const testsTypescript = {
77047704
}
77057705
`,
77067706
},
7707+
{
7708+
code: normalizeIndent`
7709+
function useMyThing<T>(): void {
7710+
useEffect(() => {
7711+
let foo: T;
7712+
}, []);
7713+
}
7714+
`,
7715+
},
77077716
],
77087717
invalid: [
77097718
{

0 commit comments

Comments
 (0)