Code has 5 errors and 4 of them are ESLint

07 Feb 2023

Perfect comments! As long as nobody else reads them…

Coding standards and styles as wanted as they are in any professional setting often have many subtle differences between programmers. Programmers perhaps having been adapted to scrutinize each character they write have oddly strange hills to die on when it comes to coding syntax. Many won’t add a space after the initial “//” of a comment while others prefer no spaces in between operators “1+4” but all of them agree to be consistent. Consistency for any project is so vitally important and it is almost like taking notes in a way because coding has a lot to do not with retaining the information of what you write but making it very clear to be able to reference later. Even for the biggest tech companies like google, there isn’t any sane person that can memorize every line of code they’ve written and so providing clear instructions or comments provide not only a way to recall what they did but also save the many headaches of their collaborating colleagues.

My thoughts on ESLint

ESLint is a great tool for polishing a project but it is a bit demoralizing finally debugging and having working code only to realize you have to check all your ESLint issues. There are ways however to apply all ESLint fixes they have available I believe which usually makes a majority of your code much more visually appealing and I do believe as tedious as it can be scrutinizing such little details is necessary. Submitting an amazing project to a job with horrid syntax is about the same as showing up to the interview in a leotard. They’ll admire your confidence but not much else. Overall coding syntax/styling is necessary and ESLint just being a very help and effective way of making sure your code adheres to those standards is fantastic.

So what style should we all use?

In the end, it doesn’t matter what style we each adopt as long as it can clearly explain and lay out the code you write. Things like the number of spaces in an index and space around the operators can generally be overlooked nd although some may claim one is better than the other the key is consistency and clearness. There is no one style we should adopt and perhaps different stylings suit different needs. We should adhere to whatever policy we make or are given and stick with it until the next great styling leads the trend. As long as we can read the code and understand the pattern of stylings everything else doesn’t matter. Except of course your actual code… you might want to focus on getting that to work before you worry if you have all your spaces in the right.. space.