Running the linter validation in our IDE or with the Terminal is not enough to be sure that we are going to validate 100% of our code, and we are not going to inject any linter errors into our Git repositories. The most effective way to be 100% sure we are sending validated code to our Git repositories is to use Git hooks. That means you run the linter validator before performing a commit (pre-commit) or before a push (pre-push). I prefer to run the linter on the pre-commit and the unit tests on the pre-push (we are going to cover unit tests in Chapter 12, Testing and Debugging).
Husky is the package we are going to use to modify our Git hooks; you can install it with this command:
npm install husky
Once we have added this ...