Looking for lint rule recommendations
Our team currently only has ESLint with default settings. If you have any rules that are useful in practice, please share them. Especially ones that helped cut down code review time.
8 answers
For real, even just hanging that up makes reviews way easier.
Our team uses eslint-plugin-import to enforce import order, and it definitely reduced the number of things to flag in reviews. But at first everyone found it annoying, so an adjustment period was needed.
Well, I think turning on TypeScript strict should come before adding ESLint rules.
Do you have a source? Like a post that compiles recommended rules.
I limited complexity to 10, and the code is much more readable now. However, there are many places that break when refactoring, so it needs to be discussed and agreed upon before adopting. I'm satisfied.
I'm curious too lol
Using eslint-plugin-import to sort import order pretty much eliminates time spent discussing conventions during code review. Adding sort-keys as well also automates object key organization, which is nice. If the team is small, it settles in quickly.
Actually, adding rules can come at a higher cost to enforce. Especially when team members have inconsistent skill levels, rules tend to cause more conflict. Instead of blindly adding rules just because they're popular, it makes more sense to gauge the team atmosphere first.