Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
Bug: eslint-plugin-react-hooks Typescript types are broken | GoodFirstPicks

Bug: eslint-plugin-react-hooks Typescript types are broken

facebook/react 7 comments 19d ago
View on GitHub
lowopenScope: somewhat clearSkill match: maybeReactJavaScriptTypeScript

Why this is a good first issue

TypeScript type definitions for eslint-plugin-react-hooks are incorrect.

AI Summary

The issue reports incorrect TypeScript type definitions in eslint-plugin-react-hooks, specifically around the flat config's recommended property. The types need to be updated to properly reflect the possible return values. The problem is reproducible but requires TypeScript and eslint configuration knowledge.

Issue Description

React version:

Steps To Reproduce

  1. npm i eslint-plugin-react-hooks
  2. configure TypeScript to strict mode,
  3. use plugin in eslint.config.ts like pluginReact.configs.flat.recommended
  4. See error:
Type 'ReactFlatConfig | undefined' is not assignable to type 'InfiniteArray<ConfigWithExtends>'.
  Type 'undefined' is not assignable to type 'InfiniteArray<ConfigWithExtends>'.

Link to code example:

The current behavior

Forced to use non-null assertion but it is banned in my eslint config =)

The expected behavior

Types can declare each existing property of flat object

GitHub Labels

Status: Unconfirmed

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 10 points when you complete it!

Risk Flags

  • typescript types
  • eslint integration
Loading labels...

Details

Points10 pts
Difficultylow
Scopesomewhat clear
Skill Matchmaybe
Test Focusedno