Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eslint-plugin-react-hooks: fix compatibility with @typescript-eslint/…
…[email protected]+ (#19751) In addition to `TSTypeQuery`, dependency nodes with a `TSTypeReference` parent need to be ignored as well. Without this fix, generic type variables will be listed as missing dependencies. Example: export function useFoo<T>(): (foo: T) => boolean { return useCallback((foo: T) => false, []); } This will report the following issue: React Hook useCallback has a missing dependency: 'T'. Either include it or remove the dependency array Closes: #19742
- Loading branch information