Ionic 2 Prepush


#1

Does anyone know how to add pre-commit with linting ? or should I use hooks ? would love to know how…
“scripts”: {
“prepush”: “npm run lint”
},

I want to force tslint before commiting and pushing to github


#2

We use git hooks.

https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks


#3

Thanks @alexthebuilder I also noticed ionic have a hooks folder … Not sure if I should be using that one ? I’m not sure how to use it