create .husky
add pre-commit
file with:
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx pretty-quick --staged
npm i @ionic/prettier-config --save-dev
npm i @ionic/eslint-config --save-dev
npm i husky --save-dev --save-exact
"prettier": "@ionic/prettier-config",
"eslintConfig": {
"extends": "@ionic/eslint-config/recommended"
},
"lint-fix": "eslint . --ext .ts --fix && prettier \"**/*.ts\" --write",