Skip to content

Latest commit

 

History

History
27 lines (23 loc) · 582 Bytes

notes.md

File metadata and controls

27 lines (23 loc) · 582 Bytes

Instructions on integration prettier into a project

Add Files & Folders

create .husky add pre-commit file with:

#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx pretty-quick --staged

Install Dependencies

npm i @ionic/prettier-config --save-dev
npm i @ionic/eslint-config --save-dev 
npm i husky --save-dev --save-exact

Add to package.json

  "prettier": "@ionic/prettier-config",
  "eslintConfig": {
    "extends": "@ionic/eslint-config/recommended"
  },
  "lint-fix": "eslint . --ext .ts --fix && prettier \"**/*.ts\" --write",