Using a Linter Will Make You a Better Dev


As we’ve been working on CrowdSync (our platform helping you automate workflows with groups of people), my co-founder Josh insisted we use a linter as we dev, to help make sure our code is more consistently formatted. We installed ESLint and the AirBNB Javascript Style Guide, and the results have been amazing.

Suffice to say, I’ll never write code without a linter again.

First, the obvious: our code is much more consistently formatted, making it easier to see what’s going on in various files (especially ones you haven’t touched). No more differences in terms of how we indent code, how we declare variables, all that. Everything is consistent, which makes working faster and more fun.

However, the other big benefit to linting didn’t hit me until using a linter for a few days. The linter was actually teaching me how to write better code. With CrowdSync, we’re writing everything in JavaScript (read about why we switched from Angular 2 to React here), and using ES6. The linter was teaching me when to use certain types of function syntax, and the react plugin we’re using for the linter was teaching me when to use stateless components vs. when not to. As I was writing code, I was actually learning how to write code differently, not just with a cleaner syntax. It’s a huge advantage.

If you’re not using a linter while you write code, you need to stop what you’re doing and get it rolling now. Your team will write more consistent code, you’ll write cleaner code, and you’ll actually become a better developer as a result.

Related Posts

Default Yes vs. Default No

Are you and your team members default yes, or default no? One is good for startups, the other not so much.

Check Your Echo Chamber

The people you surround yourself with create your reality. Choose carefully.

Don't Forget the Goal

There's only one thing that matters when you're building software.

How To Get a Job Offer

Want to get a job in the field you love easily? This is how.

Required Reading for All Couples

If you're married, about to get married, or just committed to someone for a long period of time, these three books are absolutely required reading.

I Launched a New Podcast, and I Want You to Call In

I just launched a new podcast called Design By Committee, dedicated to answering your questions about UX, product design, content, strategy and anything else tech.

Shitty Sales Have Made Product Development Harder

Shitty, one-sided sales processes have made product development much more difficult for early stage startups.

Why I'm Cold Emailing You

You might have gotten a cold email from me. Tasteless? Some people think so. Here's why I'm doing it.

How I Found Your Email

I've been cold emailing a lot of people, and many folks are surprised that I found their email. Here's where I dug it up.

Sales is User Research, Undercover