Registry /
testing / eslint-config-kentcdodds
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
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
kentcdodds
✓ extends: 'kentcdodds'
✗ extends: 'eslint-config-kentcdodds'
ESLint automatically resolves eslint-config- prefix; use shorthand name.
kentcdodds/import
✓ extends: 'kentcdodds/import'
✗ extends: 'kentcdodds/imports'
Sub-config for import plugin rules; note singular 'import'
kentcdodds/jest
✓ extends: 'kentcdodds/jest'
Sub-config for Jest rules. Uses overrides so it only applies to test files.
Installation and basic .eslintrc.js setup with the default config and optional sub-configs.
// Install the config
npm install --save-dev eslint-config-kentcdodds eslint
// Create .eslintrc.js
module.exports = {
extends: 'kentcdodds',
rules: {
// your overrides
},
}
// Or combine sub-configs
module.exports = {
extends: ['kentcdodds', 'kentcdodds/import', 'kentcdodds/jest'],
rules: {
// custom rules
},
}
// eslint.config.js (ESLint 9+ flat config, if using eslint.config.js)
import kentcdodds from 'eslint-config-kentcdodds';
export default [
...kentcdodds,
{
rules: {
// overrides
},
},
];
Debug
Known issues
breakingv21.0.0 requires Node >=18, dropping support for Node 16 and earlier.fixUpgrade Node.js to version 18 or later.
affects: >=21.0.0
breakingv20.0.0-alpha.3 requires ESLint ^8.0.0, dropping ESLint 7 support.fixUpgrade ESLint to version 8.x.
affects: >=20.0.0-alpha.3
breakingv20.0.0 merges ES6 config into main config, potentially changing rule application order.fixCheck for rule conflicts if you were extending both 'kentcdodds' and 'kentcdodds/es6'.
affects: >=20.0.0
gotchaThe 'kentcdodds/jest' config uses ESLint overrides and only applies to test files (e.g., *.test.js). It won't lint non-test files.fixEnsure test file names match pattern (e.g., *.test.js) or adjust override files pattern.
affects: >=20.0.1
gotchaAll plugins are included as dependencies, so they may introduce transitive dependencies that increase install size. Not all plugins are needed if you only use a subset of configs.fixUse individual sub-configs instead of the full default if you want to minimize dependency footprint.
affects: *
Errors
Common errors & fixes
Error: Failed to load plugin 'import' declared in '.eslintrc.js': Cannot find module 'eslint-plugin-import'
Older versions of this config required manual installation of peer dependencies; newer versions include them.
fixUpdate to latest version (v21.0.0) which includes all plugins as dependencies. Run `npm install eslint-config-kentcdodds@latest`.
ESLint couldn't find the config 'kentcdodds' after extending 'kentcdodds'. Check that the package name is correct and installed.
Missing eslint-config-kentcdodds package or incorrect extends name.
fixInstall the package with `npm install --save-dev eslint-config-kentcdodds` and ensure .eslintrc extends uses 'kentcdodds' (not 'eslint-config-kentcdodds').
TypeError: eslint.CLIEngine is not a constructor
Using an older version of ESLint (<8) with config v20+ which requires ESLint 8.
fixUpgrade ESLint to version 8 or later: `npm install --save-dev eslint@^8.0.0`
Audit
Dependencies
eslintrequiredPeer dependency required to run lint rules
typescriptoptionalOptional peer dependency for TypeScript support (version 4 or 5)