{"id":19542,"library":"eslint-config-moneyforward","title":"eslint-config-moneyforward","description":"Money Forward's extensible ESLint shared config providing curated rule sets for JavaScript/TypeScript projects. Current stable version: 6.0.0 (released 2026-04-18). The config is actively maintained by Money Forward and supports both flat config (ESLint v9) and legacy .eslintrc format. It includes presets for essentials, TypeScript, React, Next.js, Node.js, Storybook, JSDoc, and testing with Jest. Key differentiators: opinionated rules with breaking changes documented; TypeScript-first; flat config support via 'eslint-config-moneyforward/flat' subpath exports. Requires Node ^18.18.0 || ^20.9.0 || >=21.1.0 and peer dependencies on eslint ^8.57.0 || ^9.0.0, jest, and typescript ^4.8.4 || ^5.0.0.","status":"active","version":"6.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/moneyforward/frontend-tools","tags":["javascript","eslint","eslint-config","flat-config","flatconfig","flatConfig","lint","typescript"],"install":[{"cmd":"npm install eslint-config-moneyforward","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-moneyforward","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-moneyforward","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency: core linting engine","package":"eslint","optional":false},{"reason":"peer dependency: used by test rule set","package":"jest","optional":true},{"reason":"peer dependency: required for TypeScript rule sets","package":"typescript","optional":true}],"imports":[{"note":"Flat config import path uses subpath './flat'. Required for ESLint v9 flat config.","wrong":"const { essentials } = require('eslint-config-moneyforward');","symbol":"essentials","correct":"import { essentials } from 'eslint-config-moneyforward/flat';"},{"note":"Must import typescript after essentials. Do not import from package root.","wrong":"import { typescript } from 'eslint-config-moneyforward';","symbol":"typescript","correct":"import { essentials, typescript } from 'eslint-config-moneyforward/flat';"},{"note":"ESLint v9 flat config requires exporting an array from eslint.config.js.","wrong":"module.exports = { extends: ['moneyforward/essentials'] };","symbol":"flat config array","correct":"import { essentials } from 'eslint-config-moneyforward/flat';\nexport default [...essentials];"},{"note":"Use 'moneyforward/essentials' not full package name. For flat config use import.","wrong":"{\n  \"extends\": [\"eslint-config-moneyforward/essentials\"]\n}","symbol":"legacy eslintrc extends","correct":"{\n  \"extends\": [\"moneyforward/essentials\"]\n}"}],"quickstart":{"code":"npm install --save-dev eslint-config-moneyforward eslint typescript jest\n# Create eslint.config.js\nimport { essentials, typescript, test, react } from 'eslint-config-moneyforward/flat';\nexport default [\n  ...essentials,\n  ...typescript,\n  ...test.jest,\n  ...react,\n  { rules: { 'no-console': 'warn' } }\n];\n","lang":"javascript","description":"Install dependencies and configure ESLint flat config with TypeScript, testing, and React presets."},"warnings":[{"fix":"Review and fix code violating these rules before upgrading from v5.","message":"Version 6.0.0 enables 13 new error-level react-hooks rules by default (component-hook-factories, config, error-boundaries, gating, globals, immutability, preserve-manual-memoization, purity, refs, set-state-in-effect, set-state-in-render, static-components, use-memo) and 2 new warn-level rules.","severity":"breaking","affected_versions":">=6.0.0"},{"fix":"Use subpath import for flat config: import { essentials } from 'eslint-config-moneyforward/flat'.","message":"Flat config support requires ESLint v8.57.0 or v9+ and import from 'eslint-config-moneyforward/flat'. Legacy exports from root are removed in v6.","severity":"breaking","affected_versions":">=6.0.0"},{"fix":"Migrate to eslint.config.js using flat config imports.","message":"Legacy .eslintrc format (extends: ['moneyforward/...']) is not deprecated but flat config is recommended for new projects with ESLint v9.","severity":"deprecated","affected_versions":">=6.0.0"},{"fix":"Ensure order: [...essentials, ...typescript, ...other].","message":"The TypeScript rule set must be added AFTER essentials in flat config arrays, otherwise rules may not apply correctly.","severity":"gotcha","affected_versions":">=5.0.0"},{"fix":"Run npm install --save-dev eslint typescript jest plus any optional peer deps.","message":"Peer dependencies are not automatically installed. You must manually install eslint, typescript, and jest.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Ensure eslint-config-moneyforward >=5.0.0 is installed: npm install eslint-config-moneyforward@latest","cause":"Using flat config import without the package or on an older version (<5.0.0) without flat config support.","error":"Cannot find module 'eslint-config-moneyforward/flat'"},{"fix":"Place essentials before other rule sets in the export array: [...essentials, ...typescript, ...react]","cause":"Conflicting configuration due to merging flat config arrays in wrong order.","error":"Configuration for rule 'react-hooks/exhaustive-deps' is invalid"},{"fix":"Install @typescript-eslint/parser and @typescript-eslint/eslint-plugin as devDependencies.","cause":"TypeScript parser not installed. The typescript rule set expects it as a dependency.","error":"ESLint: Failed to load parser '@typescript-eslint/parser'"},{"fix":"Upgrade to v6+ and use import from 'eslint-config-moneyforward/flat'.","cause":"Using flat config with an older version of the package that exports CommonJS only.","error":"Oops! Something went wrong! :( ESLint: 9.x.x"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}