{"id":19544,"library":"eslint-config-mourner","title":"eslint-config-mourner","description":"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.","status":"active","version":"4.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/mourner/eslint-config-mourner","tags":["javascript","eslint","config"],"install":[{"cmd":"npm install eslint-config-mourner","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-mourner","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-mourner","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency — ESLint is required to use the config","package":"eslint","optional":false},{"reason":"plugin for stylistic rules (indentation, quotes, etc.)","package":"@stylistic/plugin","optional":false}],"imports":[{"note":"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.","wrong":"const config = require('eslint-config-mourner')","symbol":"default config","correct":"import config from 'eslint-config-mourner'"},{"note":"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.","wrong":"module.exports = config;","symbol":"config with overrides","correct":"import config from 'eslint-config-mourner'; export default [...config, { rules: { ... } }]"},{"note":"Prior to v4, there was a node-specific config at 'eslint-config-mourner/node'. In v4+, this is removed.","wrong":"import nodeRules from 'eslint-config-mourner/node'","symbol":"node-specific rules (deprecated)","correct":"Remove this import; node rules are no longer included. Add 'eslint-plugin-n' separately if needed."}],"quickstart":{"code":"// eslint.config.js\nimport config from 'eslint-config-mourner';\n\nexport default [\n  ...config,\n  {\n    rules: {\n      // Additional project-specific overrides\n      'no-console': 'warn'\n    }\n  }\n];","lang":"javascript","description":"Shows how to import the flat config and add project-specific rule overrides in ESLint 9+."},"warnings":[{"fix":"Upgrade ESLint to 9+. Create an eslint.config.js file with `import config from 'eslint-config-mourner'` and export an array.","message":"v4.0.0 switched from legacy eslintrc format to flat config (ESLint 9+). Your eslint.config.js must use ESM import syntax.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"If you need Node.js rules, install and configure eslint-plugin-n separately.","message":"v3.0.0 deprecated the 'node' config variant. Node-specific rules are removed from the main config.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Update @stylistic/plugin to v5 in your package.json: `npm install @stylistic/plugin@latest`.","message":"The peer dependency @stylistic/plugin v2 was replaced with v5 in v4.1.0. Older projects may have version conflicts.","severity":"deprecated","affected_versions":">=4.1.0"},{"fix":"Always use `export default [...config, { ... }]` instead of `export default { ...config, ... }`.","message":"flat config is an array of config objects, not a single object. Spreading the config is required when adding overrides.","severity":"gotcha","affected_versions":">=4.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run `npm install eslint-config-mourner` and ensure it's listed in package.json dependencies.","cause":"The package is not installed, or the import path is incorrect.","error":"Error: Cannot find module 'eslint-config-mourner'"},{"fix":"Switch to flat config format. Create eslint.config.js as an ESM module exporting an array.","cause":"Using an outdated eslintrc config (object) with a flat config that expects an array.","error":"Configuration for rule \"no-var\" is invalid. Value \"error\" does not match the expected type."},{"fix":"Upgrade ESLint to version 9: `npm install eslint@latest`.","cause":"ESLint version 8 does not support flat config; v4.0.0+ requires ESLint 9+.","error":"ESLint: 8.0.0 flat config is not supported."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}