{"id":21302,"library":"eslint-config-hudochenkov","title":"ESLint config hudochenkov","description":"A shared ESLint flat config package by hudochenkov, providing preset configurations for JavaScript, React, React Testing Library, and Jest. Current stable version 13.0.0 requires ESLint ^9.30.0, Node.js >=20, and runs as ESM only. It is released actively, following ESLint and plugin updates. Key differentiators: it is opinionated but modular, allowing selective use of `main`, `react`, `reactTesting`, and `jest` configs; it migrated to flat config in v10 and dropped CommonJS support; peer dependencies are extensive, and users must install them manually. This config enforces modern rules from `@stylistic/eslint-plugin`, `eslint-plugin-unicorn`, and `eslint-plugin-import`, and disables `import/no-unresolved`.","status":"active","version":"13.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/hudochenkov/eslint-config-hudochenkov","tags":["javascript"],"install":[{"cmd":"npm install eslint-config-hudochenkov","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-hudochenkov","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-hudochenkov","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required peer dependency for stylistic rules","package":"@stylistic/eslint-plugin","optional":false},{"reason":"Peer dependency; ESLint v9.30+ required","package":"eslint","optional":false},{"reason":"Required peer dependency for import rules","package":"eslint-plugin-import","optional":false},{"reason":"Required peer dependency for unicorn rules","package":"eslint-plugin-unicorn","optional":false},{"reason":"Required peer dependency for jest config","package":"eslint-plugin-jest","optional":true},{"reason":"Required peer dependency for reactTesting config","package":"eslint-plugin-jest-dom","optional":true},{"reason":"Required peer dependency for react config","package":"eslint-plugin-jsx-a11y","optional":true},{"reason":"Required peer dependency for react config","package":"eslint-plugin-react","optional":true},{"reason":"Required peer dependency for react config","package":"eslint-plugin-react-hooks","optional":true},{"reason":"Required peer dependency for reactTesting config","package":"eslint-plugin-testing-library","optional":true}],"imports":[{"note":"Package is ESM-only since v10.0.0. require() will throw an error.","wrong":"const { configs } = require('eslint-config-hudochenkov')","symbol":"configs","correct":"import { configs } from 'eslint-config-hudochenkov'"},{"note":"configs is a named export; default export does not exist.","wrong":"import main from 'eslint-config-hudochenkov'","symbol":"configs.main","correct":"import { configs } from 'eslint-config-hudochenkov';\nconfigs.main"},{"note":"Use configs.react, not a direct named export like { react }.","wrong":"import { react } from 'eslint-config-hudochenkov'","symbol":"configs.react","correct":"import { configs } from 'eslint-config-hudochenkov';\nconfigs.react"}],"quickstart":{"code":"// eslint.config.js\nimport { configs } from 'eslint-config-hudochenkov';\nimport { defineConfig } from 'eslint/config';\n\nexport default defineConfig([\n  configs.main,\n  configs.react,\n  {\n    rules: {\n      'no-console': 'warn',\n    },\n  },\n]);","lang":"javascript","description":"Sets up ESLint with the main and React configs from the package, then adds a custom no-console rule."},"warnings":[{"fix":"Switch to import syntax and set \"type\": \"module\" in package.json.","message":"Package is ESM-only since v10.0.0. Using require() will cause a MODULE_NOT_FOUND error.","severity":"breaking","affected_versions":">=10.0.0"},{"fix":"Update to @stylistic/eslint-plugin rules; see changelog.","message":"v12.0.0 replaced deprecated stylistic rules with @stylistic/eslint-plugin and removed remaining deprecated rules. Old configs referencing removed rules fail.","severity":"breaking","affected_versions":">=12.0.0"},{"fix":"Upgrade ESLint to v9.x.","message":"v11.0.0 migrated to ESLint v9. Peer dependencies must satisfy ESLint ^9.30.0.","severity":"breaking","affected_versions":">=11.0.0"},{"fix":"Add configs.jest to your configuration if you need Jest rules.","message":"v12.0.0 removed Jest rules from 'commonPlugins' and 'main' configs into a separate 'jest' config. Those relying on Jest rules in main get errors.","severity":"breaking","affected_versions":">=12.0.0"},{"fix":"Use eslint.config.js with flat config. See https://eslint.org/docs/latest/use/configure/configuration-files-new","message":"v10.0.0 dropped CommonJS support and migrated to flat config. Old .eslintrc files are not compatible.","severity":"deprecated","affected_versions":">=10.0.0"},{"fix":"Install all peer deps listed in package.json manually.","message":"All peer dependencies must be installed manually; they are not auto-installed by npm. Missing peer deps cause runtime errors.","severity":"gotcha","affected_versions":">=8.0.0"},{"fix":"Use ESLint >=9.30.0.","message":"Since v11, ESLint v9 is required, which does not support .eslintrc* files. Using this config with an older ESLint version fails.","severity":"gotcha","affected_versions":">=11.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use import syntax or set \"type\": \"module\" in package.json.","cause":"Using require() on an ESM-only package.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/eslint-config-hudochenkov/index.js from /path/to/eslint.config.js not supported."},{"fix":"Run: npm install --save-dev @stylistic/eslint-plugin","cause":"Missing peer dependency @stylistic/eslint-plugin.","error":"Cannot find module '@stylistic/eslint-plugin'"},{"fix":"Remove or override that rule if needed; it is explicitly disabled by the config.","cause":"Rule 'import/no-unresolved' is disabled in this config but user may have enabled it.","error":"Configuration for rule \"import/no-unresolved\" is invalid: Value \"off\" is not valid."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}