eslint-plugin-use-no-memo

raw JSON →
1.1.0 verified Fri May 01 auth: no javascript

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.

error Error: Failed to load plugin 'use-no-memo': Cannot find module 'eslint-plugin-use-no-memo'
cause Plugin not installed or ESLint cannot resolve it.
fix
Run npm install --save-dev eslint-plugin-use-no-memo
error ESLint couldn't find the plugin "use-no-memo".
cause Missing plugins configuration in flat config.
fix
Add plugins: { 'use-no-memo': useNoMemo } to your config object.
gotcha Plugin only supports ESLint flat config (v9+); legacy .eslintrc is deprecated.
fix Upgrade to ESLint v9 and use eslint.config.js (flat config).
deprecated Legacy .eslintrc.js config format may not work with future versions; flat config is required.
fix Migrate to eslint.config.js with plugins object.
gotcha Rule names are kebab-case (e.g., 'react-hook-form') not camelCase.
fix Use 'use-no-memo/react-hook-form' not 'useNoMemoReactHookForm'.
npm install eslint-plugin-use-no-memo
yarn add eslint-plugin-use-no-memo
pnpm add eslint-plugin-use-no-memo

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',
    },
  },
];