A universal prettier.io config file for all repositories at Wearsafe
Install using NPM:
# Install in a package.json file
npm i -SD "github:@broadshield/prettier-config"
Install using Yarn:
# Install in a package.json file
yarn add -D "github:@broadshield/prettier-config"
Add a .prettierrc.yjs
example ./example.prettierrc.js:
module.exports = {
...require('@broadshield/prettier-config'),
semi: true, // You can add your own custom settings/overrides here
};
Or edit package.json
example ./package.json:
{
"prettier": "@broadshield/prettier-config"
}
Copy the .prettierignore file after installing
# Copy the .prettierignore file to the root of your repository
cp node-modules/@broadshield/prettier-config/.prettierignore .prettierignore
npx mrm@2 lint-staged
prettier --write $(git diff --name-only --diff-filter d | grep '\.ts$' | xargs)