You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Observe error Could not find "incompatible-library" in plugin "react-hooks" 💥 (more output below)
➜ workspace git:(main) ✗ pnpm eslint .
Oops! Something went wrong! :(
ESLint: 9.36.0
TypeError: Key "rules": Key "react-hooks/incompatible-library": Could not find "incompatible-library"in plugin "react-hooks".
at throwRuleNotFoundError (/project/workspace/node_modules/.pnpm/eslint@9.36.0/node_modules/eslint/lib/config/config.js:100:16)
at Config.validateRulesConfig (/project/workspace/node_modules/.pnpm/eslint@9.36.0/node_modules/eslint/lib/config/config.js:603:5)
at new Config (/project/workspace/node_modules/.pnpm/eslint@9.36.0/node_modules/eslint/lib/config/config.js:484:9)
at [finalizeConfig] (/project/workspace/node_modules/.pnpm/eslint@9.36.0/node_modules/eslint/lib/config/flat-config-array.js:212:10)
at FlatConfigArray.getConfigWithStatus (/project/workspace/node_modules/.pnpm/@eslint+config-array@0.21.0/node_modules/@eslint/config-array/dist/cjs/index.cjs:1404:55)
at FlatConfigArray.getConfig (/project/workspace/node_modules/.pnpm/@eslint+config-array@0.21.0/node_modules/@eslint/config-array/dist/cjs/index.cjs:1422:15)
at entryFilter (/project/workspace/node_modules/.pnpm/eslint@9.36.0/node_modules/eslint/lib/eslint/eslint-helpers.js:322:27)
at async NodeHfs.<anonymous> (file:///project/workspace/node_modules/.pnpm/@humanfs+core@0.19.1/node_modules/@humanfs/core/src/hfs.js:574:24)
at async NodeHfs.walk (file:///project/workspace/node_modules/.pnpm/@humanfs+core@0.19.1/node_modules/@humanfs/core/src/hfs.js:614:3)
at async globSearch (/project/workspace/node_modules/.pnpm/eslint@9.36.0/node_modules/eslint/lib/eslint/eslint-helpers.js:363:20)
'Validates usage of the useMemo() hook against common mistakes. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.',
recommended: true,
};
}
caseErrorCategory.IncompatibleLibrary: {
return{
category,
severity: ErrorSeverity.Warning,
name: 'incompatible-library',
description:
'Validates against usage of libraries which are incompatible with memoization (manual or automatic)',
eslint-plugin-react-hooks version: 6.0.0-rc.2 (latest RC at time of writing)
Steps To Reproduce
pnpm add --save-dev eslint eslint-plugin-react-hooks@6.0.0-rc.2eslint.config.jswith"react-hooks/incompatible-library": "error",followingincompatible-librarydocs page by @poteto in Add new eslint rule reference docs reactjs/react.dev#7986pnpm eslint .Could not find "incompatible-library" in plugin "react-hooks"💥 (more output below)Link to code example: https://codesandbox.io/p/devbox/dr6nk2?file=%2Feslint.config.js%3A7%2C3
The current behavior
The
react-hooks/incompatible-libraryrule is not foundThe expected behavior
The
react-hooks/incompatible-libraryrule is found and usedAdditional details
The
react-hooks/incompatible-libraryrule added in #34027 by @josephsavona is referenced here:react/compiler/packages/babel-plugin-react-compiler/src/CompilerError.ts
Lines 956 to 980 in e08f53b
It appears as if this was not included in the published source of
eslint-plugin-react-hooks@6.0.0-rc.2on npm:All other documented RC rules are present and can be found.