{"id":25525,"library":"eslint-plugin-react-no-manual-memo","title":"eslint-plugin-react-no-manual-memo","description":"ESLint plugin for codebases using React Compiler. Flags manual memoization patterns (useMemo, useCallback, React.memo) to remind developers to let the compiler optimize automatically. Current version 1.0.4, actively developed, ships TypeScript types. Provides three rules: no-component-memo (auto-fixable), no-hook-memo (auto-fixable), and no-custom-memo-hook. Includes a recommended flat config for ESLint 9+. Peer dependency on eslint ^8.57.0 || ^9.0.0. Key differentiator: specifically targets React Compiler users, unlike generic eslint-plugin-react.","status":"active","version":"1.0.4","language":"javascript","source_language":"en","source_url":"https://github.com/BellCubeDev/eslint-plugin-react-no-manual-memo","tags":["javascript","react","compiler","react-compiler","eslint","plugin","linting","memoization","memo","typescript"],"install":[{"cmd":"npm install eslint-plugin-react-no-manual-memo","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-react-no-manual-memo","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-react-no-manual-memo","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for running ESLint plugin","package":"eslint","optional":false}],"imports":[{"note":"Plugin ships ESM only; CommonJS require may work depending on bundler but ESM is recommended.","wrong":"const reactNoManualMemo = require('eslint-plugin-react-no-manual-memo')","symbol":"default","correct":"import reactNoManualMemo from 'eslint-plugin-react-no-manual-memo'"},{"note":"Access individual rule definitions via named export. ESM only.","wrong":"const { rules } = require('eslint-plugin-react-no-manual-memo')","symbol":"rules","correct":"import { rules } from 'eslint-plugin-react-no-manual-memo'"},{"note":"Use configs['flat/recommended'] for ESLint 9+ flat config.","wrong":"","symbol":"configs","correct":"import { configs } from 'eslint-plugin-react-no-manual-memo'"}],"quickstart":{"code":"// Install: npm install --save-dev eslint-plugin-react-no-manual-memo\n\n// ESLint flat config (eslint.config.js)\nimport { defineConfig } from 'eslint/config';\nimport reactNoManualMemo from 'eslint-plugin-react-no-manual-memo';\n\nexport default defineConfig([\n  reactNoManualMemo.configs['flat/recommended'],\n]);\n\n// Or use individual rules\nimport reactNoManualMemo from 'eslint-plugin-react-no-manual-memo';\nexport default [\n  {\n    plugins: { 'react-no-manual-memo': reactNoManualMemo },\n    rules: {\n      'react-no-manual-memo/no-hook-memo': 'error',\n      'react-no-manual-memo/no-component-memo': 'warn',\n      'react-no-manual-memo/no-custom-memo-hook': 'warn',\n    }\n  }\n];","lang":"javascript","description":"Setup eslint-plugin-react-no-manual-memo with recommended flat config for ESLint 9+ and example of individual rule configuration."},"warnings":[{"fix":"Set rule severity explicitly: 'react-no-manual-memo/no-hook-memo': 'warn' in your config if you want warnings.","message":"v1.0.4 changed 'no-hook-memo' from warn to error in recommended config. If your build treats warnings as errors, expect new failures.","severity":"breaking","affected_versions":">=1.0.4"},{"fix":"Use defineConfig() as shown in the README, or apply config array directly per ESLint docs.","message":"Flat config (ESLint 9+) must be wrapped in defineConfig() from eslint/config when using plugin configs directly. ESLint throws an error otherwise.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use 'import' syntax, or rename config file to .mjs, or set 'type': 'module' in package.json.","message":"Plugin is ESM-only. Projects using CommonJS may encounter import issues. Ensure your ESLint config is an ES module or use dynamic import.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install --save-dev eslint-plugin-react-no-manual-memo'.","cause":"Plugin not installed or not in node_modules.","error":"Cannot find module 'eslint-plugin-react-no-manual-memo'"},{"fix":"Use reactNoManualMemo.configs['flat/recommended'] inside defineConfig() array.","cause":"Attempting to use flat config without wrapping in defineConfig() or using incorrect config key.","error":"ESLint: Error: 'react-no-manual-memo' config is not defined"},{"fix":"Use ESLint 9+ for flat config, or use .eslintrc.* format for older versions.","cause":"Using flat config style but ESLint version < 9, or mixing config formats.","error":"ESLint: Unexpected top-level property 'plugins'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}