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

How to Post to Private Slack Channels from Zapier

If you automate posting to Slack via Zapier, you might need to post to a private channel. It's not entirely obvious how to do it, but actually pretty damn easy.

Sharing is the Currency of the Web

You consume free content all day on the web. The best way to pay back the people creating it? Share it.

The Magic of Low Fidelity

High-fidelity documentation is great, but it has a hidden dark side. Learn to embrace low-fidelity documentation, and you'll be amazed at the benefits.

Why You Should Blog More (Data)

When you stop blogging, people stop coming. Simple enough. Here's the proof.

Everyone Is Self Employed

The idea that you're not self-employed if you work fulltime somewhere is wrong. EVERYONE is self-employed.

The Real Reason to Learn to Code

Not everyone needs to be a programmer, but learning a little bit of coding can help in a lot of different areas.

Review: Keto Diet

I recently gave the Keto (Ketogenic) Diet a try. Suffice to say...it works.

You Don't Need to Get it All Correct Immediately

Too many people wait on shit to be perfect. Get it close, leave out some stuff, and set yourself up to quickly iterate.

Using Foundation 6 in Angular 4 (or 2)

How to use Foundation for Sites 6 in Angular 4 (or any version 2+)

Great Products Need Great DevOps

In the quest for shipping great products, DevOps is often overlooked, and that's a mistake