eslint-config-moneyforward
raw JSON → 6.0.0 verified Sat Apr 25 auth: no javascript
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.
Common errors
error Cannot find module 'eslint-config-moneyforward/flat' ↓
cause Using flat config import without the package or on an older version (<5.0.0) without flat config support.
fix
Ensure eslint-config-moneyforward >=5.0.0 is installed: npm install eslint-config-moneyforward@latest
error Configuration for rule 'react-hooks/exhaustive-deps' is invalid ↓
cause Conflicting configuration due to merging flat config arrays in wrong order.
fix
Place essentials before other rule sets in the export array: [...essentials, ...typescript, ...react]
error ESLint: Failed to load parser '@typescript-eslint/parser' ↓
cause TypeScript parser not installed. The typescript rule set expects it as a dependency.
fix
Install @typescript-eslint/parser and @typescript-eslint/eslint-plugin as devDependencies.
error Oops! Something went wrong! :( ESLint: 9.x.x ↓
cause Using flat config with an older version of the package that exports CommonJS only.
fix
Upgrade to v6+ and use import from 'eslint-config-moneyforward/flat'.
Warnings
breaking 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. ↓
fix Review and fix code violating these rules before upgrading from v5.
breaking 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. ↓
fix Use subpath import for flat config: import { essentials } from 'eslint-config-moneyforward/flat'.
deprecated Legacy .eslintrc format (extends: ['moneyforward/...']) is not deprecated but flat config is recommended for new projects with ESLint v9. ↓
fix Migrate to eslint.config.js using flat config imports.
gotcha The TypeScript rule set must be added AFTER essentials in flat config arrays, otherwise rules may not apply correctly. ↓
fix Ensure order: [...essentials, ...typescript, ...other].
gotcha Peer dependencies are not automatically installed. You must manually install eslint, typescript, and jest. ↓
fix Run npm install --save-dev eslint typescript jest plus any optional peer deps.
Install
npm install eslint-config-moneyforward yarn add eslint-config-moneyforward pnpm add eslint-config-moneyforward Imports
- essentials wrong
const { essentials } = require('eslint-config-moneyforward');correctimport { essentials } from 'eslint-config-moneyforward/flat'; - typescript wrong
import { typescript } from 'eslint-config-moneyforward';correctimport { essentials, typescript } from 'eslint-config-moneyforward/flat'; - flat config array wrong
module.exports = { extends: ['moneyforward/essentials'] };correctimport { essentials } from 'eslint-config-moneyforward/flat'; export default [...essentials]; - legacy eslintrc extends wrong
{ "extends": ["eslint-config-moneyforward/essentials"] }correct{ "extends": ["moneyforward/essentials"] }
Quickstart
npm install --save-dev eslint-config-moneyforward eslint typescript jest
# Create eslint.config.js
import { essentials, typescript, test, react } from 'eslint-config-moneyforward/flat';
export default [
...essentials,
...typescript,
...test.jest,
...react,
{ rules: { 'no-console': 'warn' } }
];