1.1.5 • Published 5 years ago

@geniemouse/prettier-config v1.1.5

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago
  1. Installation
  2. Configuration
    1. Overriding rules

@geniemouse/prettier-config

Keep project code formatting consistent across projects with Prettier and this base configuration.

Installation

  1. Install Prettier locally:
# Using npm:
npm install --save-dev --save-exact prettier

# Using yarn:
yarn add prettier --dev --exact
  1. Install the GenieMouse Prettier configuration package locally:
# Using npm:
npm install --save-dev @geniemouse/prettier-config

# Using yarn:
yarn add --dev @geniemouse/prettier-config

Configuration

Reference the configuration package in your project's package.json file:

{
    // ...
    "prettier": "@geniemouse/prettier-config"
    // ...
}

NOTE: This method does not offer a way to extend the shared configuration. To do that, see the "Overriding rules" section below.

Overriding rules

If you need to override some properties from this shared configuration, import it in a prettierrc.js file and export the modifications:

module.exports = {
    ...require("@geniemouse/prettier-config"),
    // Shared Prettier configuration rule overrides...
    semi: false
};