eslint-config-problems

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

An ESLint shareable config that focuses on catching actual code problems without enforcing code style, designed for seamless use with Prettier. Current stable version is 10.0.1, released in 2025. This package is actively maintained and follows ESLint major versions: v8, v9, and now v10. It includes rules like no-unassigned-vars, preserve-caught-error, no-promise-executor-return, and others that prevent runtime errors, disallow bad practices (eval, with, new Number), and encourage shorter code. It is style-agnostic, meaning it does not include any stylistic rules, making it ideal for teams using Prettier. Alternatives like eslint-config-standard or eslint-config-airbnb include style rules that may conflict with Prettier. The config is ESM-only since v9 and exports a flat config object for ESLint v9+.

error Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/node_modules/eslint-config-problems/index.js not supported.
cause Using require() to load an ESM-only package.
fix
Switch to import statement or set type: module in package.json.
error Configuration for rule "no-unused-vars" is invalid: Value "warn" is not a valid severity.
cause Incorrect severity value (should be 'off', 'warn', or 'error').
fix
Use 'warn' (string) or 1 (number) as severity.
error ESLint couldn't find the config "problems" after extending.
cause Using old .eslintrc format with "extends": "problems".
fix
Use flat config and import the default export.
breaking ESLint v10 compatibility: eslint-config-problems v10 requires eslint ^10.0.0. Using with eslint v9 will fail.
fix Upgrade to eslint v10, or use eslint-config-problems v8.0.0 for eslint v8 or v9.
breaking Flat config required: v9+ of this package only supports ESLint flat config (eslint.config.js). The old .eslintrc files are not supported.
fix Migrate to eslint.config.js using flat config format. See the quickstart for an example.
breaking ESM-only: v9+ of this package is ESM-only and cannot be used with require(). Attempting require will throw a ModuleNotFoundError.
fix Use import statement in an ESM context (e.g., "type": "module" in package.json or .mjs extension).
gotcha No stylistic rules: This config intentionally omits all formatting rules. Ensure you use Prettier separately for formatting.
fix Run prettier after eslint fixes, or integrate via eslint-plugin-prettier if desired (not included).
npm install eslint-config-problems
yarn add eslint-config-problems
pnpm add eslint-config-problems

Installs eslint and the config, then sets up a flat config importing the problems config and adding a custom rule.

npm install -D eslint eslint-config-problems
// eslint.config.js
import problems from 'eslint-config-problems';
export default [
  problems,
  {
    rules: {
      'no-console': 'warn',
    },
  },
];