Shared Prettier config used in Mobile Jazz projects.
Usage is based on Sharing configurations from the Prettier docs.
-
Remove existing
.prettierrc
file, if present. -
Install the config. Note that you'll also need to install Prettier.
npm install -D prettier # if it's not already installed npm install -D @mobilejazz/prettier-config
-
Add the following to
package.json
:"prettier": "@mobilejazz/prettier-config",
For legacy projects it's OK to override the tabWidth
configuration; no other option should be overriden.
-
If present, remove existing
.prettierrc
file and/orprettier
entry inpackage.json
. -
Create a
.prettierrc.js
file, with the following content:module.exports = { ...require("@mobilejazz/prettier-config"), tabWidth: 4, };
For further details refer to the Prettier documentation.