@common-web/prettier
v1.0.7
Published
Prettier config
Downloads
8
Readme
@common-web/prettier
Automatically enforce some basic coding practice in your code base (ex spacing, quotes, tab width etc)
Getting started
Install the pkg:
yarn:
yarn add prettier @common-web/prettier -D
npm:
npm install prettier @common-web/prettier --save-dev
in your repo create prettier.config.js
then added the following:
const BasePrettierConfig = require('@common-web/prettier');
module.exports = BasePrettierConfig;
Running Prettier
Add the following to your "scripts" in your package.json
{
...,
"scripts": {
"prettier --write -l \"src/**/*.ts\
}
}
Note: Feel free change the 'src' and file pattern matching to suit your needs
yarn run prettier
or
npm run prettier