{"id":19535,"library":"eslint-config-kentcdodds","title":"eslint-config-kentcdodds","description":"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.","status":"active","version":"21.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/kentcdodds/eslint-config-kentcdodds","tags":["javascript","eslint","eslintconfig","config","kentcdodds","styleguide"],"install":[{"cmd":"npm install eslint-config-kentcdodds","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-kentcdodds","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-kentcdodds","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency required to run lint rules","package":"eslint","optional":false},{"reason":"Optional peer dependency for TypeScript support (version 4 or 5)","package":"typescript","optional":true}],"imports":[{"note":"ESLint automatically resolves eslint-config- prefix; use shorthand name.","wrong":"extends: 'eslint-config-kentcdodds'","symbol":"kentcdodds","correct":"extends: 'kentcdodds'"},{"note":"Sub-config for import plugin rules; note singular 'import'","wrong":"extends: 'kentcdodds/imports'","symbol":"kentcdodds/import","correct":"extends: 'kentcdodds/import'"},{"note":"Sub-config for Jest rules. Uses overrides so it only applies to test files.","wrong":"","symbol":"kentcdodds/jest","correct":"extends: 'kentcdodds/jest'"}],"quickstart":{"code":"// Install the config\nnpm install --save-dev eslint-config-kentcdodds eslint\n\n// Create .eslintrc.js\nmodule.exports = {\n  extends: 'kentcdodds',\n  rules: {\n    // your overrides\n  },\n}\n\n// Or combine sub-configs\nmodule.exports = {\n  extends: ['kentcdodds', 'kentcdodds/import', 'kentcdodds/jest'],\n  rules: {\n    // custom rules\n  },\n}\n\n// eslint.config.js (ESLint 9+ flat config, if using eslint.config.js)\nimport kentcdodds from 'eslint-config-kentcdodds';\nexport default [\n  ...kentcdodds,\n  {\n    rules: {\n      // overrides\n    },\n  },\n];","lang":"javascript","description":"Installation and basic .eslintrc.js setup with the default config and optional sub-configs."},"warnings":[{"fix":"Upgrade Node.js to version 18 or later.","message":"v21.0.0 requires Node >=18, dropping support for Node 16 and earlier.","severity":"breaking","affected_versions":">=21.0.0"},{"fix":"Upgrade ESLint to version 8.x.","message":"v20.0.0-alpha.3 requires ESLint ^8.0.0, dropping ESLint 7 support.","severity":"breaking","affected_versions":">=20.0.0-alpha.3"},{"fix":"Check for rule conflicts if you were extending both 'kentcdodds' and 'kentcdodds/es6'.","message":"v20.0.0 merges ES6 config into main config, potentially changing rule application order.","severity":"breaking","affected_versions":">=20.0.0"},{"fix":"Ensure test file names match pattern (e.g., *.test.js) or adjust override files pattern.","message":"The 'kentcdodds/jest' config uses ESLint overrides and only applies to test files (e.g., *.test.js). It won't lint non-test files.","severity":"gotcha","affected_versions":">=20.0.1"},{"fix":"Use individual sub-configs instead of the full default if you want to minimize dependency footprint.","message":"All 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.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Update to latest version (v21.0.0) which includes all plugins as dependencies. Run `npm install eslint-config-kentcdodds@latest`.","cause":"Older versions of this config required manual installation of peer dependencies; newer versions include them.","error":"Error: Failed to load plugin 'import' declared in '.eslintrc.js': Cannot find module 'eslint-plugin-import'"},{"fix":"Install the package with `npm install --save-dev eslint-config-kentcdodds` and ensure .eslintrc extends uses 'kentcdodds' (not 'eslint-config-kentcdodds').","cause":"Missing eslint-config-kentcdodds package or incorrect extends name.","error":"ESLint couldn't find the config 'kentcdodds' after extending 'kentcdodds'. Check that the package name is correct and installed."},{"fix":"Upgrade ESLint to version 8 or later: `npm install --save-dev eslint@^8.0.0`","cause":"Using an older version of ESLint (<8) with config v20+ which requires ESLint 8.","error":"TypeError: eslint.CLIEngine is not a constructor"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}