3 ms·
> The purpose of linters on a team - so I've been told - is so that no one has to argue about formatting anymore. People who argue this are, I believe, missing
by Izkata 6y ago
> The purpose of linters on a team - so I've been told - is so that no one has to argue about formatting anymore.
People who argue this are, I believe, missing the forest for the trees. A short on-the-spot version of something I've had in mind for a long time:
almost everyone has a slightly different style that they fall into and the individual styles arent necessarily difficult to understand
AT LEAST WHEN USED ON THEIR OWN, AND NOT MIXED WITH OTHER STYLES.
Your Brain Adapts To A Given One, When Reading That Style. It May Still Feel Like Stuttering, But Once Adapted It's Fully Readable.
Evensomeonewithareallybizarrestylecanbereadwithalittleefforttofigureoutwhatthatstyleis.
The problemcomeswhen You have MULTIPLE people OnA team, and THE SYLES getallmixedupsoittakes a lot moreefforttofigureoutwhatTHEFUCKisgoingon.
Linting is all about picking a style and sticking with it so the code doesn't end up with multiple personality disorder.
> Even though it's perfectly legal to disable linting for lines or files, most of the time when I do it, it's flagged by someone in review, and there's some discussion and I'm forced to rewrite and remove my disable and go back to whatever the linter was forcing. "These rules are there for a reason, and were put together by people with more experience and smarter than us - we shouldn't go disabling things whenever we want just because we don't like them or think we know better". (amalgamation of multiple comments from people stopping me disabling lint checks in specific situations).
When this happens, I think it should open a wider team conversation about whether that particular rule is actually worthwhile, or whether it goes against what your team wants and should be altered/disabled. Unfortunately, I have encountered a couple rules where the linter wasn't configurable enough to get what we wanted as a team, so there's definitely reason to allow per-instance disabling...