ESLint: Valuable but Irritating

26 Sep 2024

The importance of coding standards

I believe that applying proper coding standards into your projects is an essential software engineering technique that every engineer should enforce. It has a multitude of benefits such as improving the readability of the code, preventing bugs and errors, and displaying professionalism. Applying proper coding standards ensures the code is written in a consistent style, making it easier for yourself and others to understand and review. It reduces cognitive load when reading through large amounts of code, which is probably complicated enough as it is. Having a consistent and clean coding style is especially important for software engineers because we will have many people reviewing our code, as well as teammates that need to understand what we’re writing. Error prevention is also another strong benefit of proper coding standards. Adhering to standards often includes using best practices, which help prevent common bugs. For example. consistent naming conventions and comment can reduce the chance of a variable being misused. Lastly, following proper coding standards shows professionalism and pride in one’s work. Clean, well documented, and organized code reflects an engineers attention to detail.

My thoughts on ESLint

After about a week of using it, I think ESLint is generally a valuable tool when it comes to enforcing coding standards and helping to improve the clarity of the code. It ensures that the entire project is consistent and clean, which is one of the most important parts of coding in my opinion. However, I will not lie and say that I enjoy being on the recieving end of all the ESLint errors even when my code works perfectly fine. I understand the importance of the errors, but it is definitely painful trying to resolve all the squigly red lines, especially when its not immediately clear what the problem is. I also think a few of the coding standards enforced in ESLint are unnecessary, such as a trailing space after a line of code. In my opinion, it doesn’t change the clarity of the code and only ends up overwhelming me with more errors. Despite this, and also the fact that ESLint makes WODs more stressful, I do enjoy using it because it helps me to build the habit of using proper coding standards, which I know is of great importance to software engineers.