Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Linters often don’t provide the constraints you desire. While they’re a great (arguably essential) tool, they often are not sufficient.

When a project has well-established patterns, part of the job is to just follow the pattern, whether you like it or not, until you find a reason to 1) change the pattern everywhere, or; 2) make an exception to the pattern with intention.



It's quite simple to write a rule, e.g. for the example I shared https://typescript-eslint.io/rules/array-type. But I've never seen any reputable project arguing against T[] for simple types. In my opinion, that says a lot about the reviewer, not the contributor. If a linter rule doesn't exist, you should argue against the idiomatic convention.


I’m not arguing any particular rule… But what linter are you assuming I’m running? You can’t always write your own rules.


Write a lint rule. It's often quite easy.


What linter are you assuming I’m running? You can’t always write your own rules.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: