npm.io
1.2.0 • Published 10 months ago

@coldboy002/prettier-config

Licence
MIT
Version
1.2.0
Deps
2
Size
6 kB
Vulns
0
Weekly
0
Stars
1

@coldboy002/prettier-config

NPM version

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.

Changelog

License

Keywords