It can find lots of errors in your code and enforce your preferred style (spaces, not tabs!) JSHint originated as a fork of JSLint and was designed to be less "opinionated" and more configurable than its predecessor.
Advice: Use ESLint
Please see the help page for ESLint. Both tools are very similar and the instructions for ESLint mostly apply to JSHint as well.