ESLint: Worth it or Not?


Comparing Coding to Skateboarding

I’m a skateboarder. Since I got my first board at 14, I’ve loved skating and the rush of adrenaline that it gives me. One thing that I often notice at skateparks is the warning signs telling me not to skate without a helmet on. I’ve always understood the concept of helmets being important, but when I saw my friend fall backwards from a ramp and slam his head hard on the ground, the significance of the warnings really came to life to me. Luckily my friend actually did listen to the warnings and was okay, but the realization of the warnings hit me hard. I realized that while the importance of wearing a helmet might not always be apparent when things are going smoothly and no one is getting hurt, but occasionally, things can go wrong and it is important to follow best practices. In the same way, following coding standards might not always seem important while writing code, but when the code is executed or needs to be readable, the warnings that ESLint provided really come in handy especially if they prevent the code from breaking or operating improperly for edge cases.

Why I like ESLint

I personally have had a good experience with ESLint so far. I think that the suggestions that it provides me provides extra assurance that I am writing functional and well-structured code. The suggestions also help me to learn the language that I am coding in. It’s like having a peer reviewer always over my shoulder telling me what I can do to make my code better. Additionally, if I follow the suggestions and make the changes it wants me to, I am given the extra incentive of not seeing so many red squiggly lines on my code anymore. In my opinion, in the same way that Typescript makes Javascript code safer and more proper, ESLint gives my Typescript code an extra layer of safety.

Some potential downsides to ESLint

I think that some people could say that ESLint just provides more work to programmers. Additionally, it could feel restricting because it is always trying to get the programmer to code its way. However, the customization of the different rules that can be added or removed from ESLint provides programmers with more freedom to code in their own style. Additionally, ESLint provides more work, but if the programmer sees value in the extra work of writing better code, then I think it is worth it.

Conclusion

In conclusion, I am happy with ESLint so far and I see the benefit of it. Let’s see if my opinion changes the more I use it.