This is a pre-commit script that will see the git diff and run the appropriate checks like JSHint and Rubocop
You can add to your .git/hooks
of any repo that you like.
- Don't forget to add the executable permission to this file and have the following installed:
- Git
- Rubocop
- JShint
- This script will only run on "Changes to be committed" because it uses the --cached option for the git diff.
Skip pre-commit: -n --no-verify