ESLint & Coding Standards

06 Feb 2019


  This week in ICS 314 we have begun our journey towards achieving competency in our class software stack in ernest. In the IDE and Quality Assurance modules we were required to install, configure, and become familiar with using the IntelliJ IDE for development, along with ESLint for quality assurance.

ESLint

  After spending the past week working with ESLint, I’m happy to report that it was an enjoyable experience. Initially I struggled to conform to the new coding style for this class, but eventually managed to acclimate to the new convention. Once I was comfortable, ESLint noticeably improved my workflow and helped me address issues as they arose. By being able to quickly address issues, chasing the green checkmark never felt like a chore, and instead gave me a great sense of satisfaction.

Pain Versus Gain

  ESLint aggressively tracks down and flags any deviation from the currently enforced coding standard, and while this can be aggravating at times, I was pleasantly surprised with the wealth of benefits that it brings to the table. As I spent more time under ESLints ever watchful eye, my code was noticeably more readable than before. Increased readability makes reviewing code easier, and also helps to promote effective cooperation among classmates. I also noticed that I was making far less syntactical mistakes, which cut down the amount of lines of code that I had to re-type. By cutting down on the amount of lines of code that you have to type, your productivity will increase and you can accomplish more in the same amount of time. However, ESLint is not without its flaws. The strict enforcement of the coding standard can be confusing at times, and flag false positives. This is most noticeable when writing functions. Once a function or variable is declared, ESLint will immediately flag that there is an error because the function has not been used yet. Overall, ESLint is a fantastic tool that helps to immediately improve the quality of your code, and reinforce your JavaScript fundamentals.