It's okay to commit lint fixes

jankapunkt

Jan Küster

Posted on January 20, 2023

It's okay to commit lint fixes

Trigger-warning, this is all highly opinionated. If you feel different about it, let's discuss 😄

It bases on my assumption, that a "clean" git history is something I might want to achieve but I don't necessarily need to achieve and the tradeoff between what I get by a clean history and the work I have to do for it seems to be negative for teams below enterprise-level size. Therefore commits about "lint fixes" are totally okay imo.

Here are some rather technical arguments:

"fix(ui): eslint compliance"

  • if you use a convention then you can easily filter these commits:

git log --invert-grep --grep="eslint compliance"

  • you can still use git squash-merge if a clean history is of most importance

Here are some rather human arguments:

  • for newcomers and beginners it's often much easier to first commit the work they have done (feel safe; make sure things a working) and then apply formatting, refactoring etc.
  • convention over configuration does imo also apply to the dev environment, which is why I regularly omit pre-commit hooks
  • I also like to avoid to put my juniors into a skinner-box that only lets them pass, once they behave as I intend them to; rather I'd like them to learn conventions

What do you think? Something is missing? Is this unprofessional and I should never step a foot into your company's door? Let's discuss 😄

💖 💪 🙅 🚩
jankapunkt
Jan Küster

Posted on January 20, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

It's okay to commit lint fixes
productivity It's okay to commit lint fixes

January 20, 2023