Registry / testing / eslint-plugin-use-no-memo

eslint-plugin-use-no-memo

JSON →
library1.1.0jsnpmunverified

ESLint plugin enforcing the 'use no memo' directive for React libraries incompatible with React Compiler. Current version 1.1.0. Helps automatically detect when using incompatible hooks (e.g., react-hook-form, @tanstack/react-table, material-react-table) and adds the opt-out directive. Differentiator: fills a gap in the React Compiler ecosystem by automating a manual workaround. Requires ESLint >=9.0.0 with flat config support.

npm install eslint-plugin-use-no-memo
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-USE-
E
eslint-plugin-use-no-memo
testingjavascriptv1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

useNoMemo
✓ import useNoMemo from 'eslint-plugin-use-no-memo'
✗ const useNoMemo = require('eslint-plugin-use-no-memo')
ESM default import for ESLint flat config. CJS require might work in Node, but flat config is ESM-first.
use-no-memo/react-hook-form
✓ 'use-no-memo/react-hook-form': 'error'
✗ 'use-no-memo/react-hook-form': 2
Rule name uses kebab-case; severity should be string ('error') not numeric (ESLint v9 style).
plugin configuration
✓ plugins: { 'use-no-memo': useNoMemo }
✗ plugins: ['use-no-memo']
ESLint flat config requires an object with plugin name as key; legacy array format fails.

ESLint flat config to enforce 'use no memo' directive for react-hook-form, @tanstack/react-table, and material-react-table.

import useNoMemo from 'eslint-plugin-use-no-memo'; export default [ { plugins: { 'use-no-memo': useNoMemo, }, rules: { 'use-no-memo/react-hook-form': 'error', 'use-no-memo/tanstack-table': 'error', 'use-no-memo/material-react-table': 'error', }, }, ];
Debug
Known issues
gotchaPlugin only supports ESLint flat config (v9+); legacy .eslintrc is deprecated.
fix
Upgrade to ESLint v9 and use eslint.config.js (flat config).
affects: >=1.0.0
deprecatedLegacy .eslintrc.js config format may not work with future versions; flat config is required.
fix
Migrate to eslint.config.js with plugins object.
affects: >=1.0.0
gotchaRule names are kebab-case (e.g., 'react-hook-form') not camelCase.
fix
Use 'use-no-memo/react-hook-form' not 'useNoMemoReactHookForm'.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Failed to load plugin 'use-no-memo': Cannot find module 'eslint-plugin-use-no-memo'
Plugin not installed or ESLint cannot resolve it.
fix
Run npm install --save-dev eslint-plugin-use-no-memo
ESLint couldn't find the plugin "use-no-memo".
Missing plugins configuration in flat config.
fix
Add plugins: { 'use-no-memo': useNoMemo } to your config object.
Upgrade
Version history
1.1.0latest on npm
Audit
Dependencies
eslintrequiredpeer dependency, required for plugin to work
Agent activity
4 hits · last 30 days
node
4
Resources
eslint-plugin-use-no-memo — npm install eslint-plugin-use-no-memo · libregistry