Slides and examples from my talk at HannoverJS in November 2017
http://slides.com/timche/formatting-code-with-prettier-and-friends
This repository contains two branches master
and pre-commit-hook
demonstrating two ways of formatting files in a examples
folder with Prettier. Checkout package.json
on both branches for more details.
Running Prettier manually.
# Install dependencies
npm install
# Run Prettier
npm run prettier
Running Prettier as a Git pre-commit
hook with Husky and lint-staged.
# Instal dependencies
npm install
# Add `examples/` from `master`
git checkout master examples
# Commit
git commit -m 'add examples'