Today's linters are so powerful that they can catch many errors at compile time. It's wonderful finding out that you made a mistake the moment you hit Save, rather than waiting until run time to hunt some cryptic issue down.
Examples include enforcing the position of curly braces or warning about the use of built-in features that your team has decided to avoid, like confirm and alert. Many teams prefer to use nicely styled dialogue boxes instead of the native implementations of these features. Linting helps programmatically restrict their usage. Or leaving in a trailing comma, or forgetting to add a trailing comma if your team prefers trailing commas as a standard. Or declaring a global variable, or disallowing the use of eval since it's potentially dangerous and often misused. All of these are examples of enforcing consistency through a linter.
JSLint was the original, created by Douglas Crockford many years ago. It's extremely opinionated, and while some may consider that a feature, the public has largely moved on to more powerful and configurable alternatives today. One such alternative is JSHint. JSHint is an improvement on JSLint which offers more configurability.
But in recent years, the most popular linter by far has become ESLint. In fact, it's become so powerful and configurable that ESLint has become the de facto standard.