Lint Rolling Clothes, Linting Code

19 Sep 2023

Coding standards, although tedious, seem to be very valuable in the grand scheme of programming. In some cases, coding standards have even helped solidify my understanding of JavaScript. For instance, when coding in IntellliJ, ESLint told me to use “===” instead of “==” in one of my functions. Although it did not really matter for the purpose of that code, the strict equality operator “===” would have been more appropriate.

My Thoughts on ESLint

After a week of usage, I have gotten used to working with ESLint and IntelliJ. I will admit that it seemed tedious and almost hindering my productivity in the beginning, but now I don’t mind it at all. I even found a command to run that fixes all (or at least most) of the ESLint complaints. This way I can easily keep all of my code consistent and easier to read. With this command, I find that getting the green checkmark in the corner can be very easy. Not only that, but it is useful to know that all of your code is meeting the preferred style throughout.

ESLint: The Downsides

Although widely beneficial, ESLint has its own challenges. In some cases, ESLint will not actually fix the error, but instead add a line of code to ignore that error. One of the major downsides of coding with ESLint is getting used to what it wants. For instance, I am already used to writing strings with double quotes instead of single quotes. However, ESLint complains if I use a double quote, so I am trying to get used to using single quotes. This is to avoid unnecessary time spent going back and fixing the issue.

Coding Standards in General

Overall, I think coding standards are great, particularly if you have a team working on the same code. This way, the code written will have consistency and better quality throughout. Although there will always be stylistic differences in the sense that different people may solve problems differently, at least the code itself will be more readable for everyone.