Holepunch Prettier Config
raw JSON → 2.0.0 verified Sat Apr 25 auth: no javascript
Shared Prettier configuration used by Holepunch projects. Version 2.0.0 requires Prettier ^3.6.2. Provides a standardized set of formatting options for consistent code style across Holepunch repositories. Simple to use by referencing the package name in .prettierrc.
Common errors
error Cannot find module 'prettier-config-holepunch' ↓
cause Package not installed or not in node_modules.
fix
Run: npm install --save-dev prettier-config-holepunch
error Configuration file .prettierrc contains an invalid option: prettier-config-holepunch ↓
cause Using the package name as a key instead of a string value.
fix
Change .prettierrc to: "prettier-config-holepunch"
Warnings
breaking Version 2.0.0 requires Prettier ^3.6.2, which may have breaking changes from Prettier 2.x. ↓
fix Update Prettier to 3.6.2 or later.
gotcha Do not use require() or import to load this config; it must be a string in .prettierrc. ↓
fix Set .prettierrc to the string "prettier-config-holepunch".
gotcha If you override options, you may lose the shared defaults; merge carefully. ↓
fix Use extends or spread to preserve base config.
Install
npm install prettier-config-holepunch yarn add prettier-config-holepunch pnpm add prettier-config-holepunch Imports
- prettier-config-holepunch wrong
require('prettier-config-holepunch') in JScorrect"prettier-config-holepunch" in .prettierrc
Quickstart
// .prettierrc
"prettier-config-holepunch"
// Then format with:
// npx prettier --check .
// npx prettier --write .