@coldboy002/prettier-config
Shareable config for Prettier.
For consistent formatting across my repos.
Installation
npm install --save-dev @coldboy002/prettier-config
or
yarn add --dev @coldboy002/prettier-config
Note: This package requires Node.js 22.0.0 or later. It is not compatible with older versions.
Usage
Add this line to your package.json
"prettier": "@coldboy002/prettier-config",
Alternatively, add this to .prettierrc file:
"@coldboy002/prettier-config"
To extend the configuration, create prettier.config.js and spread this config onto your own config object:
import cbConfig from '@coldboy002/prettier-config'
/** @type {import('prettier').Config} */
const config = {
...cbConfig,
experimentalTernaries: true,
}
export default config
Refer to Prettier documentation, if you need override some options.