ESLint with the Hints & Coding Standards

19 Sep 2023

Follow the Rules!

Coding standards are defined as a set of guidelines to produce consistent, high-quality code. The overall goal of coding standards is to develop cleaner code and increase the efficiency of the code with minimal errors. Especially when working with other programmers, following coding standards maintains the structure that everyone follows, showcasing a uniform appearance of a program coded by multiple people. Thus, coding standards result in easier collaborations and ensure a “common look and feel” of the code.

Within the coding standards, specific tools are provided depending on the language. For instance, ESLint is a built-in tool specifically for JavaScript. Similar to the Word auto-correct feature that checks for grammatical and spelling errors in this essay I am currently writing, ESLint checks for common problems such as syntax errors, formatting issues, code style violations, and potential bugs. Not only does ESLint underline the errors in red, but ESLint also provides suggestions for the errors, which becomes a great tool for learning.

Transitioning for the Better

Honestly, the first week of using ESLint with IntelliJ was a struggle for me. Because I have been coding without any sort of structure, I needed a moment to transition from my style of coding to the class’s coding standard. Up until this point, I was unaware that specific coding standards existed. My first time using ESLint painted a screen full of red squiggly lines but compared to my code during the first week of the course, I immediately noticed the cleanliness of my current code.

A minor yet helpful feature I appreciate is fixing the indentation. For me, having proper indentation is important because I struggle with maintaining the readability of my code. Most times I forget or add an extra bracket and although it is a small fix, the outcome of my code significantly changes from this problem. Moreover, I appreciate ESLint for detecting errors in the early phases. Before, I would compile my code in almost every line to make sure my syntax was correct, but I wasted a lot of time constantly switching from my console to my code. Since ESLint detects and highlights errors immediately, I save a lot of time without needing to analyze every single line of code. However, I should still run my code occasionally just to make sure, but I do not have to run it as frequently as I used to. Lastly, the most rewarding feeling besides my code compiling correctly is when the green check mark finally appears indicating no errors.

A Tool to Learn

Indeed, ESLint is the best tool for “code checking,” highlighting all the errors and providing suggestions for the errors. However, it is not just a “code checker” but also a tool to learn from. Using the suggestions, I learn from my mistakes, and I learn more efficient methods to carry on with my program.

Utilizing coding standards has more advantages than disadvantages. I cannot think of any disadvantages… The coding standards, especially with ESLint detecting any errors, improve the readability and efficiency of my code. Whether detecting incorrect indentation or wrong method calls, using coding standards with ESLint effectively improved my style and learning of code. Coding standards are defined as a set of guidelines to produce consistent, high-quality code. The overall goal of coding standards is to develop cleaner code and increase the efficiency of the code with minimal errors. Especially when working with other programmers, following coding standards maintains the structure that everyone follows, showcasing a uniform appearance of a program coded by multiple people. Thus, coding standards result in easier collaborations and ensure a “common look and feel” of the code.

Within the coding standards, specific tools are provided depending on the language. For instance, ESLint is a built-in tool specifically for JavaScript. Similar to the Word auto-correct feature that checks for grammatical and spelling errors in this essay I am currently writing, ESLint checks for common problems such as syntax errors, formatting issues, code style violations, and potential bugs. Not only does ESLint underline the errors in red, but ESLint also provides suggestions for the errors, which becomes a great tool for learning.

Transitioning for the Better

Honestly, the first week of using ESLint with IntelliJ was a struggle for me. Because I have been coding without any sort of structure, I needed a moment to transition from my style of coding to the class’s coding standard. Up until this point, I was unaware that specific coding standards existed. My first time using ESLint painted a screen full of red squiggly lines but compared to my code during the first week of the course, I immediately noticed the cleanliness of my current code.

A minor yet helpful feature I appreciate is fixing the indentation. For me, having proper indentation is important because I struggle with maintaining the readability of my code. Most times I forget or add an extra bracket and although it is a small fix, the outcome of my code significantly changes from this problem. Moreover, I appreciate ESLint for detecting errors in the early phases. Before, I would compile my code in almost every line to make sure my syntax was correct, but I wasted a lot of time constantly switching from my console to my code. Since ESLint detects and highlights errors immediately, I save a lot of time without needing to analyze every single line of code. However, I should still run my code occasionally just to make sure, but I do not have to run it as frequently as I used to. Lastly, the most rewarding feeling besides my code compiling correctly is when the green check mark finally appears indicating no errors.

A Tool to Learn

Indeed, ESLint is the best tool for “code checking,” highlighting all the errors and providing suggestions for the errors. However, it is not just a “code checker” but also a tool to learn from. Using the suggestions, I learn from my mistakes, and I learn more efficient methods to carry on with my program.

Utilizing coding standards has more advantages than disadvantages. I cannot think of any disadvantages… The coding standards, especially with ESLint detecting any errors, improve the readability and efficiency of my code. Whether detecting incorrect indentation or wrong method calls, using coding standards with ESLint effectively improved my style and learning of code.