Skip to content

Latest commit

 

History

History

prettier-config-porschedigital

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

@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

  1. 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"
  1. Update package.json:
{
  "prettier": "@porscheofficial/prettier-config-porschedigital"
}
  1. [Optional] Add scripts to package.json:
"scripts": {
  "prettier:ci": "prettier --check ./",
  "prettier:fix": "prettier --write ./"
}
  1. [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.