Skip to content

Latest commit

 

History

History
22 lines (20 loc) · 705 Bytes

code-quality.md

File metadata and controls

22 lines (20 loc) · 705 Bytes

Code quality (javascript)

Don't use:

  1. Naming of files/funcs/variables is important
  2. Magical numbers or strinags

  1. Nesting of the code, more than 2
  2. Too much if/else statements
  3. Duplicates of the code
  4. Variable that is used only once
  5. For/while and other loops, use arrays methods

  1. Redundant iteration throught arrays or objects - speed
  2. Take attention to the memory usage, don't create new array if it is not needed
  3. Divide your code into logical blocks
  4. BIG code blocks (inside {} - if, loop or array methods)

  1. Every line of code should be easy to read
  2. Every piece of code must be tested

Code style (javascript):

https://github.com/airbnb/javascript