0.1.0 • Published 6 years ago
@scentregroup/prettier-config v0.1.0
Scentre Group Prettier Config
This package contains Scentre Group's Prettier configuration.
Usage
- Run
yarn add prettier@1.8.2 @scentregroup/prettier-config --dev
- Run
touch .prettierrc.js
- Add the following snippet to the file:
module.exports = require('@scentregroup/prettier-config')
- Add a
format
task toscripts
inpackage.json
:prettier --write '**/*.{js,css,scss}'
- If you would like a watch task for format,
yarn add onchange --dev
, and add aformat:watch
task toscripts
inpackage.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
0.1.0
6 years ago