Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
Bug: `eslint-plugin-react-hooks` - Broken resolution in `7.0.1` | GoodFirstPicks

Bug: `eslint-plugin-react-hooks` - Broken resolution in `7.0.1`

facebook/react 9 comments 1mo ago
View on GitHub
mediumopenScope: somewhat clearSkill match: maybeReactJavaScriptTypeScript

Why this is a good first issue

Issue involves dependency resolution and TypeScript compatibility in eslint-plugin-react-hooks.

AI Summary

The issue involves a broken resolution in [email protected], causing errors when running ESLint and TypeScript compatibility issues. The problem appears to be related to dependency paths and TypeScript type definitions. The fix likely requires updating dependency paths and ensuring TypeScript compatibility, but the exact scope and impact are not entirely clear.

Issue Description

React version: N/A

Steps To Reproduce

  1. Install [email protected]
  2. Configure with a .config.ts configuration (although an issue raised in zod-validation-error shows esm/resolve so may also flag with a .js config)
  3. Run npx eslint .
  4. Error printed:
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './v4' is not defined by "exports" in /node_modules/zod-validation-error/package.json
    at exportsNotFound (node:internal/modules/esm/resolve:313:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:660:9)
    at resolveExports (node:internal/modules/cjs/loader:650:36)
    at Function._findPath (node:internal/modules/cjs/loader:717:31)
    at Function._resolveFilename (node:internal/modules/cjs/loader:1369:27)
    at Function.resolve (node:internal/modules/helpers:157:19)
    at jitiResolve (node_modules/jiti/dist/jiti.cjs:1:148703)
    at jitiRequire (node_modules/jiti/dist/jiti.cjs:1:150290)
    at node_modules/jiti/dist/jiti.cjs:1:157987
    at node_modules/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js:20:16

The current behavior

There is an error when running eslint - Downgrading to 7.0.0 resolves both the above error, and the typescript issue below.

The expected behavior

There is no error running eslint.

Type Discrepancy

Additionally, with v7.0.1, typescript complains that the react-hooks plugin is not the correct type:

// Truncated
 Types of property 'configs' are incompatible.
    Type '{ recommended: { plugins: string[]; rules: RulesConfig; }; 'recommended-latest': { plugins: string[]; rules: RulesConfig; }; flat: { recommended: ReactHooksFlatConfig; "recommended-latest": ReactHooksFlatConfig; }; }' is not assignable to type 'Record<string, ConfigObject<RulesConfig> | LegacyConfigObject<RulesConfig, RulesConfig> | ConfigObject<RulesConfig>[]>'.
      Property 'flat' is incompatible with index

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

  • dependency resolution
  • TypeScript compatibility
Loading labels...

Details

Points10 pts
Difficultymedium
Scopesomewhat clear
Skill Matchmaybe
Test Focusedno