@square/prettier-config
Square's shared Prettier configuration.Usage
Install
npm install --save-dev @square/prettier-config
yarn add --dev @square/prettier-config
pnpm install --dev @square/prettier-config
Configure
Reference the shared configuration in yourpackage.json
file:{
"name": "my-cool-library",
"version": "9000.0.1",
"prettier": "@square/prettier-config"
}
If you don’t want to use
package.json
, you can use any of the supported extensions to export a string, e.g. .prettierrc.json
:"@square/prettier-config"
Read more on Prettier configuration.
Philosophy
By far the biggest reason for adopting Prettier is to stop all the on-going debates over styles.
– Prettier's Option Philosophy
This minimal, practically nonexistent, configuration is intended to provide consistent, automatic formatting throughout a project.