You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should update the style guide to take into consideration ES6 best practices. There are new language level features that should be taken into consideration here:
Arrow functions
Descructuring
Rest params
Generators
Class definitions
The text was updated successfully, but these errors were encountered:
The airbnb style guide is pretty good, there is a lot of overlap, such as:
13.2 Use one const declaration per variable. eslint: one-var jscs: disallowMultipleVarDecl
Why? It's easier to add new variable declarations this way, and you never have to worry about swapping out a ; for a , or introducing punctuation-only diffs. You can also step through each declaration with the debugger, instead of jumping through all of them at once.
I found one glaring disagreement and they provide compelling reason:
7.1 Use function declarations instead of function expressions. jscs: requireFunctionDeclarations
Why? Function declarations are named, so they're easier to identify in call stacks. Also, the whole body of a function declaration is hoisted, whereas only the reference of a function expression is hoisted. This rule makes it possible to always use Arrow Functions in place of function expressions.
We should update the style guide to take into consideration ES6 best practices. There are new language level features that should be taken into consideration here:
The text was updated successfully, but these errors were encountered: