Threespot’s Prettier config settings
npm install @threespot/prettier-configTo install Prettier and prettier-config:
``bash`
$ yarn add prettier-config prettier --dev
If you already installed prettier:
`bash`
$ yarn add prettier-config --dev
:`jsonc
{
// ...
"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.
$3
1. Install Prettier extension via vscode
2. Reload the editor
3. 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.