Registry / devops / prettier-config-hudochenkov

prettier-config-hudochenkov

JSON →
library0.4.0jsnpmunverified

A shareable Prettier configuration created by hudochenkov. As of version 0.4.0, it is an ESM-only package requiring Prettier 3 and Node >=16. Key features include a specific set of opinionated defaults with trailingComma set to 'all'. It differentiates from other shared configs by being minimal and focused on personal preferences. The package has migrated to ESM and removed support for Prettier 1.x and 2.x. It is intended for developers who want to adopt the author's Prettier style without custom configuration.

npm install prettier-config-hudochenkov
INSTALL
IMPORT
SIG · PRETTIER-CONFIG-HU
P
prettier-config-hudochenkov
devopsjavascriptv0.4.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.

default
import prettierConfig from 'prettier-config-hudochenkov'
const prettierConfig = require('prettier-config-hudochenkov')
ESM-only since v0.4.0; CommonJS require will fail.
default
"prettier": "prettier-config-hudochenkov" in package.json
"prettier": "./node_modules/prettier-config-hudochenkov"
Simplest usage is via package.json prettier field; no explicit import needed.
default
// prettier.config.js export { default } from 'prettier-config-hudochenkov';
module.exports = require('prettier-config-hudochenkov')
In Prettier config files, use ESM export syntax since v0.4.0.

Installs Prettier and the shared config, sets it in package.json, and runs Prettier to check formatting.

npm install --save-dev prettier prettier-config-hudochenkov echo '{ "prettier": "prettier-config-hudochenkov" }' > package.json npx prettier --check .
Debug
Known issues
breakingCommonJS require() is no longer supported. This package is ESM-only since v0.4.0.
fix
Use import syntax or switch to version 0.3.0 if you need CommonJS.
affects: >=0.4.0
breakingDropped support for Prettier 2 and Prettier 1. Peer dependency requires Prettier ^3.0.1.
fix
Upgrade Prettier to v3 or use version 0.3.0 for Prettier 2.
affects: >=0.4.0
deprecatedOption `jsxBracketSameLine` is replaced by `bracketSameLine` since v0.3.0.
fix
Use `bracketSameLine` instead.
affects: <0.3.0
breakingNode.js version <16 is no longer supported since v0.4.0.
fix
Upgrade Node.js to v16 or later.
affects: >=0.4.0
gotchaThe config sets `trailingComma` to `all` (changed from `es5` in v0.4.0). Ensure your codebase is compatible.
fix
Review code for trailing commas in function parameters and other places where it might break older syntax.
affects: >=0.4.0
Errors
Common errors & fixes
Cannot find module 'prettier-config-hudochenkov'
Package not installed or incorrect import path.
fix
Run `npm install --save-dev prettier-config-hudochenkov` and ensure your configuration file correctly references it.
Error [ERR_REQUIRE_ESM]: require() of ES Module not supported.
Using CommonJS require() with an ESM-only package (v0.4.0+).
fix
Use `import prettierConfig from 'prettier-config-hudochenkov'` or switch to dynamic import.
Validation Error: prettier-config-hudochenkov: Invalid configuration: unknown option `jsxBracketSameLine`.
Using an outdated version of the config that still references the deprecated option.
fix
Update to prettier-config-hudochenkov@0.3.0 or later, and use `bracketSameLine` instead.
Upgrade
Version history
0.4.0latest on npm
Audit
Dependencies
prettierrequiredpeer dependency required to use the config
Agent activity
4 hits · last 30 days
node
4
Resources
prettier-config-hudochenkov — npm install prettier-config-hudochenkov · libregistry