ESLint is Watching

22 Sep 2016

Another week of software engineering class gone by, a week of introductions to IntelliJ, a week of ESLint BREATHING DOWN MY BACK.

A Rebellion is in Order!

… is what I initially thought, grudgingly placing spaces in between parameters and curly braces. The errors that ESLint had oh so graciously pointed out to me were frivolous, arguing that I had to make a code I already found clean to somehow be cleaner. Spotless. How can I code anything when I’m constantly being scolded for my preferred typing style?

Any sane person undergoing stricter standard changes would find it troublesome to suddenly have to care about a problem that wasn’t an issue the day before. ESLint, a code quality tool I use with IntelliJ, was created to drive these such people insane. Myself included. Even though I believed I was a clean programmer, ESLint seemed to have a problem with the spacing in my code blocks. Wanted to throw a fit when there wasn’t a newline at the end of a file. Screamed indecencies because I used defined a variable as a let instead of a const.

But really, was any of that screaming in vain? You may think, there’s no point in writing about ‘rebellion’ if the so called rebels don’t prevail over their opposition. If you keep that thought in your mind, for one, you’ll never be able to stomach 1984. Secondly, you won’t ever see the benefits of little-miss-perfect ESLint.

No one likes a show off, but it’s hard to argue with them if everything they do is a validation of their proclaimed splendor. Although I found ESLint highly annoying to deal with at first, I adapted quickly to the standards it held for me. There weren’t any hard issues that needed to be thought through much. As a programmer, one finds that troubleshooting simple quick fixes, like inserting a space, is incredibly minor compared to bigger issues, like rewriting entire blocks of code. ESLint even goes through the trouble to tell you exactly what part of a line must be fixed, making the process more bearable.

After spending my first few minutes with ESLint making small adjustments, my code wasn’t looking like it used to. Excess variables were gone. Code was more appropriate, accurate, and consistent. Yes, it was a bit more spread out than what I preferred. But if it is what is set as a standard for the common public, then it was not going to be big deal to me. It might be Big Brother talking, but a little conformity couldn’t hurt anyone, could it? Overall, everyone is happier. The green check mark can be fun to aim for, instead of a pain. So the next time you think about opposing coding standards, keep in mind there are reasons behind them.

Remember, ESLint is watching.