@porscheofficial/prettier-config-porschedigital
v4.0.0
Published
This package provides Porsche Digital's prettier-config as an extensible shared config.
Downloads
1,106
Readme
@porscheofficial/prettier-config-porschedigital
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:
🔧 Configure Project
- 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:
if(ide === "vscode")
update ./.vscode/settings.json
:
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
}
}
License
See LICENSE.