@threespot/prettier-config
v1.0.0
Published
Threespot’s Prettier config settings
Downloads
518
Readme
prettier-config
Threespot’s shareable config for Prettier
Install:
To install Prettier and prettier-config:
$ yarn add prettier-config prettier --dev
If you already installed prettier:
$ yarn add prettier-config --dev
Usage:
To enable these rules reference it in your package.json
:
{
// ...
"prettier": "prettier-config"
}
If you don't want to reference it via package.json
, visit prettier's documentation on shareable configuration to use one of their other options.
Editor Integration
Instead of using prettier's CLI api to format your JavaScript, you can integrate prettier into your text editor.
VS Code
- Install Prettier extension via vscode
- Reload the editor
- In your user settings, add
editor.formatOnSave: true
For more information on VS Code prettier's extension.
If you are not using VS code, visit Prettier's editor integration for instructions on your editor.