This package provides the prettier config as an extensible shared component.
The config just reflects the default values. It doesn't make any sense to install this without the ESLint config. Have a look here for specific and complete setup information:
- Install with peerDependencies:
npm info "@porscheofficial/prettier-config-porschedigital" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs yarn add --dev "@porscheofficial/prettier-config-porschedigital"
- Update
package.json
:
{
"prettier": "@porscheofficial/prettier-config-porschedigital"
}
- [Optional] Add scripts to
package.json
:
"scripts": {
"prettier:ci": "prettier --check ./",
"prettier:fix": "prettier --write ./"
}
- [Optional] Enable eslint autofix:
Requires Prettier Plugin
esbenp.prettier-vscode
// .vscode/settings.json
{
"editor.formatOnSave": true,
"[javascript]": {
"editor.formatOnSave": false
},
"[javascriptreact]": {
"editor.formatOnSave": false
},
"[typescript]": {
"editor.formatOnSave": false
},
"[typescriptreact]": {
"editor.formatOnSave": false
}
}
See LICENSE.