Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Latest commit

 

History

History
37 lines (25 loc) · 1.11 KB

README.md

File metadata and controls

37 lines (25 loc) · 1.11 KB

Mobile Jazz Prettier Config

Shared Prettier config used in Mobile Jazz projects.

Usage

Usage is based on Sharing configurations from the Prettier docs.

  1. Remove existing .prettierrc file, if present.

  2. 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
  3. Add the following to package.json:

    "prettier": "@mobilejazz/prettier-config",

Applying Overrides

For legacy projects it's OK to override the tabWidth configuration; no other option should be overriden.

  1. If present, remove existing .prettierrc file and/or prettier entry in package.json.

  2. 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.