Salesforce prettier configuration for all projects.
First install this package.
yarn add @salesforce/prettier-config
Then extend this configuration in your own prettier file.
Here is an example using a .prettierrc.json
file.
"@salesforce/prettier-config"
Note: You can use @salesforce/dev-scripts to set this up along with all other configuration files related to a Salesforce typescript project.