Registry / testing / eslint-config-mourner

eslint-config-mourner

JSON →
library4.1.0jsnpmunverified

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.

npm install eslint-config-mourner
INSTALL
IMPORT
SIG · ESLINT-CONFIG-MOUR
E
eslint-config-mourner
testingjavascriptv4.1.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default config
✓ import config from 'eslint-config-mourner'
✗ const config = require('eslint-config-mourner')
The config is exported as a flat config object (ESM only since v4). In ESLint 9+ flat config, it's imported as default and used directly in eslint.config.js.
config with overrides
✓ import config from 'eslint-config-mourner'; export default [...config, { rules: { ... } }]
✗ module.exports = config;
Flat config is an array of objects. Merge by spreading the imported config and adding own rules. Common mistake: overriding config instead of extending it.
node-specific rules (deprecated)
✓ Remove this import; node rules are no longer included. Add 'eslint-plugin-n' separately if needed.
✗ import nodeRules from 'eslint-config-mourner/node'
Prior to v4, there was a node-specific config at 'eslint-config-mourner/node'. In v4+, this is removed.

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' } } ];
Debug
Known issues
breakingv4.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.
affects: >=4.0.0
breakingv3.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.
affects: >=3.0.0
deprecatedThe 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`.
affects: >=4.1.0
gotchaflat 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, ... }`.
affects: >=4.0.0
Errors
Common errors & fixes
Error: Cannot find module 'eslint-config-mourner'
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.
Configuration for rule "no-var" is invalid. Value "error" does not match the expected type.
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.
ESLint: 8.0.0 flat config is not supported.
ESLint version 8 does not support flat config; v4.0.0+ requires ESLint 9+.
fix
Upgrade ESLint to version 9: `npm install eslint@latest`.
Upgrade
Version history
4.1.0latest on npm
Audit
Dependencies
eslintrequiredpeer dependency — ESLint is required to use the config
@stylistic/pluginrequiredplugin for stylistic rules (indentation, quotes, etc.)
Agent activity
4 hits · last 30 days
node
4
Resources
eslint-config-mourner — npm install eslint-config-mourner · libregistry