First, the arguments for linting…
Lint catches bugs?
How many bugs does it really catch? Only a few. Rules against unused variables can be useful when you’ve renamed something in one place and forgotten another place, for example. Trouble is, I’ve only noticed lint catching bugs in code that wasn’t complete or tested anyway, and therefore already broken by definition.
The major category of bugs caught by lint can be caught instead by a simple statement:
But is it worth bringing in lint for the few bugs it can find?
I think not; the better approach is simple: learn to use strict reflexively. Then spend the effort you were going to use typing semicolons on testing instead.
Lint enforces consistency?
So what? Consistency for its own sake is a pursuit of feeble minds.
In writing, particularly writing computer programs, consistency is a proxy for something much more important: readability. And readability is not something that computers yet understand well.
It is perfectly possible, common, in fact, to write incomprehensible code that passes a linter.
But, you say, “lint rules can help a little, so we should use them. We just need to pick a ruleset.”
Lint reduces bikeshedding?
adopted Crockford Style and moved on argued endlessly about which rules were important.
We went from the ultra-rigid linter, to the ultra-configurable, to the ultra-pluggable. At each step, we introduced more and more time-consuming opportunities to argue about picayune issues.
To paraphrase Tim Harford:
Lint is such a temping distraction because it feels like work, but it isn’t. When you’re arguing about lint rules or fixing lint errors, you’re editing code, but you’re not getting things done.
So should I never lint?
All that said, I recommend lint for one purpose: it can be a useful way to learn about the idioms and pitfalls of a language. Run your code through a linter and learn why it complains.
This use of lint as a teaching tool is actively discouraged by the way most people advocate using it. Imagine you set up a hook that says “all code must pass lint before commit.” Those who actually could benefit from the lint suggestions are blocked by them, thus encouraged to “fix” the “problem” as quickly as possible: obey the tool and never learn why.