0.1.0 • Published 6 years ago

@scentregroup/prettier-config v0.1.0

Weekly downloads
27
License
-
Repository
github
Last release
6 years ago

Scentre Group Prettier Config

This package contains Scentre Group's Prettier configuration.

Usage

  1. Run yarn add prettier@1.8.2 @scentregroup/prettier-config --dev
  2. Run touch .prettierrc.js
  3. Add the following snippet to the file:
module.exports = require('@scentregroup/prettier-config')
  1. Add a format task to scripts in package.json: prettier --write '**/*.{js,css,scss}'
  2. If you would like a watch task for format, yarn add onchange --dev, and add a format:watch task to scripts in package.json: onchange '**/*.{js,css,scss}' -- prettier --write {{changed}}

Development

If you would like to try out the repository locally: 1. Run git clone git@github.com:ScentreGroup/javascript_config.git 2. cd javascript_config/prettier-config 3. Create a global link to this repository via yarn link 4. In the repository you would like to test, run yarn link @scentregroup/prettier-config. 5. You can then proceed as per the Usage section.

Contents

This configuration file changes the following:

  • Removes unnecessary semicolons
  • Enforces the use of single quotes instead of double quotes