logoalt Hacker News

diegof79 • today at 2:40 PM • 1 reply • view on HN

It’s a reasonable take.

However, lint tools sit in a middle ground where speed matters: the linter doesn’t catch compile errors; the compiler does that; the linter is not a unit or functional test.

The linter serves multiple purposes related to codebase maintenance: catching minor gotchas, enforcing best practices (at the code level), enforcing code style, and catching random project constraints (like disallowing certain imports).

And you run them all the time: automatically in an editor, when working with an agent, on CI/CD. In all these situations, a small speed gain has a lot of impact.

My hot take: perhaps we can give the agent a list of rules in plain text, and the agent builds the code to check them once, using some native framework, to produce a highly project-specific, optimized CLI. If you need to add a rule, you can make the agent regenerate the CLI.

So tools like eslint become the small pieces of a code validation framework.


Replies

demosthanos • today at 3:02 PM

My feeling is that we actually underutilize linters because they're so slow that extending them too much hurts. Switching to better linters should allow us to catch more, sooner.

In the TypeScript world the linter pairs with the type system to give you a toolkit for writing custom static analysis rules that can prove that certain types of bugs simply can't exist in any code, even new code, without anyone having to remember to write a new test for such-and-such an edge case on a new feature.

TS plus lints can catch far, far more than most people credit them with, and with agents running amok in our codebases that's an extremely valuable resource to have.

Fast lints mean that I can use that tool with relative impunity rather than hemming and hawing about whether it's worth an extra 10 seconds on an already-too-long lint step.