ESLint? What? Is that some kind of a furball?

13 Feb 2020

Standards for coding

What is the point of coding standards? We all need them, even though we might not realize at the time that we do. Major development companies and big softwares all utilize coding standards. Coding standards not only help the source code look presentable, it reduces risk of errors introduced into the source code. In our introductory courses in CS, we all had that moment where our code would not compile. After hours and hours of debugging and asking around for help, it was only a matter of a single missing semi-colon that prevented our code from compiling. Following effective coding standards help prevent problems like this from occurring.

ESLint

ESLint is a tool for JavaScript that finds problems associated with your code. These problems may include but are not limited to: syntax issues, coding style issues, logic issues, etc. ESLint points out issues in your code such as a missing space between parentheses and function declarations. After using ESLint for a week, it is definitely a new type of experience. I had never experienced an IDE telling me that I do not have enough spaces between my words, or that I should be using const to declare a variable instead of let. At first, I perceived it as extremely annoying. The reason is because while the code was still functional, it kept giving me errors that I needed to get rid of for my assignments. However, as I kept complying to the standards imposed upon me, I began to realize how much nicer my code looked compared to before. Legibility definitely improved, and it was easier to find and fix errors because of how structured my code was. It definitely takes a bit of time to get used to, but overall, the experience with ESLint (at least for me) has been a positive and constructive one.

Improving code with coding standards?

While I do not believe that coding standards directly improve the quality of a code, I do believe that coding standards are necessary to make such improvements in quality. Collaboration among peers will be a productive experience if proper coding standards are in place and practiced. Collaboration is common in software development, or any kind of development, and if proper coding standards are not practiced, it will make it that much harder to make necessary changes without confusion. Overall, coding standards are a necessity to improve coding experiences.