Registry / testing / eslint-config-hudochenkov

eslint-config-hudochenkov

JSON →
library13.0.0jsnpmunverified

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

npm install eslint-config-hudochenkov
INSTALL
IMPORT
SIG · ESLINT-CONFIG-HUDO
E
eslint-config-hudochenkov
testingjavascriptv13.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 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

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

configs
import { configs } from 'eslint-config-hudochenkov'
const { configs } = require('eslint-config-hudochenkov')
Package is ESM-only since v10.0.0. require() will throw an error.
configs.main
import { configs } from 'eslint-config-hudochenkov'; configs.main
import main from 'eslint-config-hudochenkov'
configs is a named export; default export does not exist.
configs.react
import { configs } from 'eslint-config-hudochenkov'; configs.react
import { react } from 'eslint-config-hudochenkov'
Use configs.react, not a direct named export like { react }.

Sets up ESLint with the main and React configs from the package, then adds a custom no-console rule.

// eslint.config.js import { configs } from 'eslint-config-hudochenkov'; import { defineConfig } from 'eslint/config'; export default defineConfig([ configs.main, configs.react, { rules: { 'no-console': 'warn', }, }, ]);
Debug
Known issues
breakingPackage is ESM-only since v10.0.0. Using require() will cause a MODULE_NOT_FOUND error.
fix
Switch to import syntax and set "type": "module" in package.json.
affects: >=10.0.0
breakingv12.0.0 replaced deprecated stylistic rules with @stylistic/eslint-plugin and removed remaining deprecated rules. Old configs referencing removed rules fail.
fix
Update to @stylistic/eslint-plugin rules; see changelog.
affects: >=12.0.0
breakingv11.0.0 migrated to ESLint v9. Peer dependencies must satisfy ESLint ^9.30.0.
fix
Upgrade ESLint to v9.x.
affects: >=11.0.0
breakingv12.0.0 removed Jest rules from 'commonPlugins' and 'main' configs into a separate 'jest' config. Those relying on Jest rules in main get errors.
fix
Add configs.jest to your configuration if you need Jest rules.
affects: >=12.0.0
deprecatedv10.0.0 dropped CommonJS support and migrated to flat config. Old .eslintrc files are not compatible.
fix
Use eslint.config.js with flat config. See https://eslint.org/docs/latest/use/configure/configuration-files-new
affects: >=10.0.0
gotchaAll peer dependencies must be installed manually; they are not auto-installed by npm. Missing peer deps cause runtime errors.
fix
Install all peer deps listed in package.json manually.
affects: >=8.0.0
gotchaSince v11, ESLint v9 is required, which does not support .eslintrc* files. Using this config with an older ESLint version fails.
fix
Use ESLint >=9.30.0.
affects: >=11.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/eslint-config-hudochenkov/index.js from /path/to/eslint.config.js not supported.
Using require() on an ESM-only package.
fix
Use import syntax or set "type": "module" in package.json.
Cannot find module '@stylistic/eslint-plugin'
Missing peer dependency @stylistic/eslint-plugin.
fix
Run: npm install --save-dev @stylistic/eslint-plugin
Configuration for rule "import/no-unresolved" is invalid: Value "off" is not valid.
Rule 'import/no-unresolved' is disabled in this config but user may have enabled it.
fix
Remove or override that rule if needed; it is explicitly disabled by the config.
Upgrade
Version history
13.0.0latest on npm
Audit
Dependencies
@stylistic/eslint-pluginrequiredRequired peer dependency for stylistic rules
eslintrequiredPeer dependency; ESLint v9.30+ required
eslint-plugin-importrequiredRequired peer dependency for import rules
eslint-plugin-unicornrequiredRequired peer dependency for unicorn rules
eslint-plugin-jestoptionalRequired peer dependency for jest config
eslint-plugin-jest-domoptionalRequired peer dependency for reactTesting config
eslint-plugin-jsx-a11yoptionalRequired peer dependency for react config
eslint-plugin-reactoptionalRequired peer dependency for react config
eslint-plugin-react-hooksoptionalRequired peer dependency for react config
eslint-plugin-testing-libraryoptionalRequired peer dependency for reactTesting config
Agent activity
10 hits · last 30 days
node
10
Resources
eslint-config-hudochenkov — npm install eslint-config-hudochenkov · libregistry