Updated

JavaScript Rules

This styleguide extends Airbnb JavaScript Style Guide.
The gist of the style guide can be found bellow:

  • Tabs for indent (Why?)
  • Single quotes for strings
  • Required semicolon
  • Required trailing commas
  • Space after keywords
  • Always use === instead of ==
  • Always use const or let to declare variables

Why semicolons?

Removing semicolons would require each developer to learn how ASI (Automatic Semicolon Insertion) works
and think about all the exceptions while coding.

Why tailing commas?

With tailing commas the diff becomes cleaner and less confusing. Here is an example which demonstrates this:

const fruits = [
'apple',
- 'banana
+ 'banana,
+ 'pineapple'
]

Without the dangling comma, an additional entry leads to a change of two lines.

const fruits = [
'apple',
'banana,
+ 'pineapple',
Made with ❤ in Neopix HQ