-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Variables
We use const mainly, but if we need to change its value, we may use let, but not var.
because ES6 is our standard.
Functions
We always use the arrow function.
Statements
We always finish the statements with ; even it's not required on ES6.
Promises
When there's a depends on others, don't use call-back functions, just use promises instead.
Linter
For the server-side, we use "airbnb-base"
But or react app, we use "eslint:recommended", "react-minimal"
Naming
For naming variables, functions, and function parameters, use camel-case like this firstSecond
when using build-in call-back functions, usually there's an error parameter (first parameter usually),
we shouldn't name it just like err, but a name related to the error message like fetchErr, and use fetchErr not fetchError.
Also for the database, we are using camel-case for the names of database table and fields.