Registry / testing / eslint-config-kentcdodds

eslint-config-kentcdodds

JSON →
library21.0.0jsnpmunverified

ESLint shareable config reflecting Kent C. Dodds' personal style preferences. Current version 21.0.0, released Jan 2024, requiring Node >=18 and ESLint ^8. Key differentiators: includes all necessary plugins as dependencies (no manual install), composes several sub-configs (import, jest, react, jsx-a11y) that can be used standalone or combined, and is actively maintained with frequent updates to align with latest ESLint rules.

npm install eslint-config-kentcdodds
INSTALL
IMPORT
SIG · ESLINT-CONFIG-KENT
E
eslint-config-kentcdodds
testingjavascriptv21.0.0
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.

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.
fix
Upgrade 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.
fix
Upgrade 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.
fix
Check 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.
fix
Ensure 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.
fix
Use 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.
fix
Update 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.
fix
Install 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.
fix
Upgrade ESLint to version 8 or later: `npm install --save-dev eslint@^8.0.0`
Upgrade
Version history
21.0.0latest on npm
Audit
Dependencies
eslintrequiredPeer dependency required to run lint rules
typescriptoptionalOptional peer dependency for TypeScript support (version 4 or 5)
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-config-kentcdodds — npm install eslint-config-kentcdodds · libregistry