Shared Prettier config used in Mobile Jazz projects.
Usage is based on Sharing configurations from the Prettier docs.
-
Remove existing
.prettierrcfile, 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
.prettierrcfile and/orprettierentry inpackage.json. -
Create a
.prettierrc.jsfile, with the following content:module.exports = { ...require("@mobilejazz/prettier-config"), tabWidth: 4, };
For further details refer to the Prettier documentation.