- Prefer ES6 classes over prototypes.
- Use strict equality checks (
===
and!==
) except when comparing against (null
orundefined
). - Prefer arrow functions
=>
, over thefunction
keyword except when defining classes or methods. - Use semicolons at the end of each statement.
- Prefer double quotes.
- Use
PascalCase
for classes,lowerCamelCase
for variables and functions,SCREAMING_SNAKE_CASE
for constants,_singleLeadingUnderscore
for private variables and functions. - Prefer template strings over string concatenation.
- Prefer promises over callbacks.
- Prefer array functions like
map
andforEach
overfor
loops. - Use
const
for declaring variables that will never be re-assigned, andlet
otherwise. - Avoid
var
to declare variables.
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.