Linting all the way!

Atanda Dammy
2 min readSep 26, 2018

--

You might have already guessed the direction of this discuss. Yeah, you guessed right. I love ESLint. And I didn’t start loving it until recently. Let me brief you the story.

You know Andela simulated sprint, this boot camp, has been really rigorous. Yes, it has been challenges over challenges ever since. Breaking through these challenges always had lessons to leave behind indeed. These lessons are the biggest benefits of the boot camp. That’s how I see it, anyway.

For a long time, prior to the boot camp, I was only conversant with JavaScript. I didn’t know Node. For me, there was no ExpressJS, Mocha, PostgreSQL and sadly, no ESLint as well. I’m glad to see that story change. Over those periods, I used to wish there was a way I could easily refactor my codes and abide by globally accepted standards for writing JS codes. Usually my code was disorganized. I didn’t like that as it used to take me more time to rearrange the code. “What if I had someone to monitor the excesses in my code”, I would fantasize. Or fantasy I thought it was. In time, actually, I was bound to make the big encounter.

Without further ado, linting does what I just said above. It does what I craved for.

Linting is the process of running a program that will analyse code for potential errors.

-Wikipedia

Well, that’s what Wikipedia tells us.

Of course, there are other linting libraries apart from ESLint such as JSHint. ESLint is, however, the most widely used. It’s easy to use and configure compared to others. I’m not saying ESLint is the best. I wouldn’t know that as I’m yet to try others out. However, I’m saying I’ve grown to appreciate ESLint.

One of the cool features in ESLint is that one can set desired rules, use predefined rulesets like AirBnB and even re-configure those rules. I use VSCode. ESLint integrates well with VSCode such that whilst writing my code, I get alerted of already-existing errors. It’s so easy! I don’t have to visit the terminal incessantly anymore.

Before I end this write-up, I would love to hear what Wikipedia has left to tell us about ESLint.

In 2013, Nicholas C. Zakas created ESLint. Both JSLint and JSHint were lacking the ability to create additional rules for code quality and coding style. After contributing to JSHint, Zakas decided to create a new linting tool, ESLint, where all rules are configurable, and additional rules can be defined or loaded at run-time.

— Wikipedia

--

--