My team has been working a lot to improve our code quality and to introduce best practices between us. One way we’ve done this is through the use of JSHint. Because we use different editors it can be difficult to make sure that everyone’s environment is configured to analyze code the same way, but git is a common tool between us. Here is a pre-commit hook, which checks all .js files included in the commit against your JSHint configuration. If it doesn’t pass, the errors are printed to the screen and the commit is cancelled.