2 ms·
Something I think that programmers don't always appreciate is that linting isn't an either/or proposition necessarily. A linter is exactly like the spelling/gra
by WorldMaker 9y ago
Something I think that programmers don't always appreciate is that linting isn't an either/or proposition necessarily. A linter is exactly like the spelling/grammar checker in your word processor. It's there to advise you. It's not always right, and it's often a distraction to what your actual goal is (telling a story, etc).
Common advice among writers is: for the first draft, turn off spelling/grammar checks. Ignore the distraction to focus on the important bits (the plot arc). When it is time to polish, then turn them back on.
I've seen too many teams that don't trust linters and have them entirely off, because they find it too much of a distraction.
I've seen too many teams that get hobbled in the minutiae of linters and mandate that a linter be on 100% of the time, that every last rule of the linter be 100% followed, that linter advisement/warnings should be taken as gospel and break the build.
Absolutely don't use a linter if you don't think it is helping you and you don't like the advice it gives. On the flipside, don't treat a linter as gospel, not just because there are many ways to style something and have it be readable/useful, but also because it distracts sometimes from the actual importance of the work (building working coed), and sometimes the creativity (creative styling used sparingly can enhance the code's readability; just as creative spellings or intentional grammar breaks can be useful in a work of fiction). It's easy to forget that programming is a creative act and that people aren't machines and don't need to follow every rule to a T every time.
I treat linters as a weirdly pedantic code review friend. I tell it to go away if it is bugging me and I'm trying to focus. I take it's advice with a grain of salt, and I use my own human judgment sometimes.
I understand why teams make lint errors build problems, and invite linter checks directly into their PR reviews, but that's not something I care to do in my own projects. Being a slave to a linter dehumanizes the experience of a programmer, and sometimes as programmers we deride the creative chaotic mess that a linter prevents, but that chaotic mess is sometimes art and poetry, too.