eslint-config-mourner

raw JSON →
4.1.0 verified Sat Apr 25 auth: no javascript

A strict, opinionated ESLint configuration for JavaScript projects, maintained by mourner. The current stable version is 4.1.0, released in early 2025. It migrated to ESLint's flat config format in v4, removing deprecated rules and incorporating @stylistic/plugin for code style. Compared to alternatives like airbnb or standard, this config is designed to be comprehensive yet easy to adopt incrementally, with automatic fixes supported. Release cadence is irregular, with major version bumps for breaking config changes.

error Error: Cannot find module 'eslint-config-mourner'
cause The package is not installed, or the import path is incorrect.
fix
Run npm install eslint-config-mourner and ensure it's listed in package.json dependencies.
error Configuration for rule "no-var" is invalid. Value "error" does not match the expected type.
cause Using an outdated eslintrc config (object) with a flat config that expects an array.
fix
Switch to flat config format. Create eslint.config.js as an ESM module exporting an array.
error ESLint: 8.0.0 flat config is not supported.
cause ESLint version 8 does not support flat config; v4.0.0+ requires ESLint 9+.
fix
Upgrade ESLint to version 9: npm install eslint@latest.
breaking v4.0.0 switched from legacy eslintrc format to flat config (ESLint 9+). Your eslint.config.js must use ESM import syntax.
fix Upgrade ESLint to 9+. Create an eslint.config.js file with `import config from 'eslint-config-mourner'` and export an array.
breaking v3.0.0 deprecated the 'node' config variant. Node-specific rules are removed from the main config.
fix If you need Node.js rules, install and configure eslint-plugin-n separately.
deprecated The peer dependency @stylistic/plugin v2 was replaced with v5 in v4.1.0. Older projects may have version conflicts.
fix Update @stylistic/plugin to v5 in your package.json: `npm install @stylistic/plugin@latest`.
gotcha flat config is an array of config objects, not a single object. Spreading the config is required when adding overrides.
fix Always use `export default [...config, { ... }]` instead of `export default { ...config, ... }`.
npm install eslint-config-mourner
yarn add eslint-config-mourner
pnpm add eslint-config-mourner

Shows how to import the flat config and add project-specific rule overrides in ESLint 9+.

// eslint.config.js
import config from 'eslint-config-mourner';

export default [
  ...config,
  {
    rules: {
      // Additional project-specific overrides
      'no-console': 'warn'
    }
  }
];