Registry / testing / eslint-config-problems

eslint-config-problems

JSON →
library10.0.1jsnpmunverified

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+.

npm install eslint-config-problems
INSTALL
IMPORT
SIG · ESLINT-CONFIG-PROB
E
eslint-config-problems
testingjavascriptv10.0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

problems (default)
import problems from 'eslint-config-problems'
const problems = require('eslint-config-problems')
Since v9, the package is ESM-only and exports a default flat config object. CommonJS require will fail in ESLint v9+.
problems (default) in eslint.config.js
export default [ problems, { rules: {...} } ];
module.exports = problems
ESLint v9+ expects an array of flat config objects. Using module.exports or exporting a single object without array will cause errors.
problems (default) in .eslintrc (deprecated)
import problems from 'eslint-config-problems'; export default [ problems ];
// .eslintrc.json: { "extends": "problems" }
The old .eslintrc format with "extends" is not supported for this package in v9+. Must use flat config.

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', }, }, ];
Debug
Known issues
breakingESLint 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.
affects: >=10.0.0
breakingFlat 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.
affects: >=9.0.0
breakingESM-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).
affects: >=9.0.0
gotchaNo 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).
affects: >=1.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/node_modules/eslint-config-problems/index.js not supported.
Using require() to load an ESM-only package.
fix
Switch to import statement or set type: module in package.json.
Configuration for rule "no-unused-vars" is invalid: Value "warn" is not a valid severity.
Incorrect severity value (should be 'off', 'warn', or 'error').
fix
Use 'warn' (string) or 1 (number) as severity.
ESLint couldn't find the config "problems" after extending.
Using old .eslintrc format with "extends": "problems".
fix
Use flat config and import the default export.
Upgrade
Version history
10.0.1latest on npm
Audit
Dependencies
eslintrequiredpeer dependency; the config requires ESLint to function
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-config-problems — npm install eslint-config-problems · libregistry