{"id":20297,"library":"prettier-config-hudochenkov","title":"prettier-config-hudochenkov","description":"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.","status":"active","version":"0.4.0","language":"javascript","source_language":"en","source_url":"https://github.com/hudochenkov/prettier-config-hudochenkov","tags":["javascript"],"install":[{"cmd":"npm install prettier-config-hudochenkov","lang":"bash","label":"npm"},{"cmd":"yarn add prettier-config-hudochenkov","lang":"bash","label":"yarn"},{"cmd":"pnpm add prettier-config-hudochenkov","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required to use the config","package":"prettier","optional":false}],"imports":[{"note":"ESM-only since v0.4.0; CommonJS require will fail.","wrong":"const prettierConfig = require('prettier-config-hudochenkov')","symbol":"default","correct":"import prettierConfig from 'prettier-config-hudochenkov'"},{"note":"Simplest usage is via package.json prettier field; no explicit import needed.","wrong":"\"prettier\": \"./node_modules/prettier-config-hudochenkov\"","symbol":"default","correct":"\"prettier\": \"prettier-config-hudochenkov\" in package.json"},{"note":"In Prettier config files, use ESM export syntax since v0.4.0.","wrong":"module.exports = require('prettier-config-hudochenkov')","symbol":"default","correct":"// prettier.config.js\nexport { default } from 'prettier-config-hudochenkov';"}],"quickstart":{"code":"npm install --save-dev prettier prettier-config-hudochenkov\n\necho '{\n  \"prettier\": \"prettier-config-hudochenkov\"\n}' > package.json\n\nnpx prettier --check .","lang":"javascript","description":"Installs Prettier and the shared config, sets it in package.json, and runs Prettier to check formatting."},"warnings":[{"fix":"Use import syntax or switch to version 0.3.0 if you need CommonJS.","message":"CommonJS require() is no longer supported. This package is ESM-only since v0.4.0.","severity":"breaking","affected_versions":">=0.4.0"},{"fix":"Upgrade Prettier to v3 or use version 0.3.0 for Prettier 2.","message":"Dropped support for Prettier 2 and Prettier 1. Peer dependency requires Prettier ^3.0.1.","severity":"breaking","affected_versions":">=0.4.0"},{"fix":"Use `bracketSameLine` instead.","message":"Option `jsxBracketSameLine` is replaced by `bracketSameLine` since v0.3.0.","severity":"deprecated","affected_versions":"<0.3.0"},{"fix":"Upgrade Node.js to v16 or later.","message":"Node.js version <16 is no longer supported since v0.4.0.","severity":"breaking","affected_versions":">=0.4.0"},{"fix":"Review code for trailing commas in function parameters and other places where it might break older syntax.","message":"The config sets `trailingComma` to `all` (changed from `es5` in v0.4.0). Ensure your codebase is compatible.","severity":"gotcha","affected_versions":">=0.4.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run `npm install --save-dev prettier-config-hudochenkov` and ensure your configuration file correctly references it.","cause":"Package not installed or incorrect import path.","error":"Cannot find module 'prettier-config-hudochenkov'"},{"fix":"Use `import prettierConfig from 'prettier-config-hudochenkov'` or switch to dynamic import.","cause":"Using CommonJS require() with an ESM-only package (v0.4.0+).","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module not supported."},{"fix":"Update to prettier-config-hudochenkov@0.3.0 or later, and use `bracketSameLine` instead.","cause":"Using an outdated version of the config that still references the deprecated option.","error":"Validation Error: prettier-config-hudochenkov: Invalid configuration: unknown option `jsxBracketSameLine`."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}