5

Javascript has changed hugely in the last five years with es6

Now we have choices about whether to use let, const or var
We can choose whether to use arrow functions to reduce code verbiage

Is there a concise summary of quality guidelines to use for code review?
I know there are linters but I was wondering if there are some compact guidelines to help during coding and code review.

I might start with:

  • review all var declaration to ensure that global scope is intended

Is there a more comprehensive list ?

3

I'd highly recommend you take a look at the Airbnb Style Guide. Although, it's a little long and has some subjective rules, you can easily pick out your favorites and apply them to your code reviews.

Also, it's nearly impossible to remember all the JS rules and best practices so while you're coding I'd really recommend you use a linter like eslint. You can configure it to your preference, and many text editors will lint for you as you code. You can even have eslint extend the airbnb style guide which is huge to be able to follow best practices from the start until you memorize them.

Best of luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.