-
Be descriptive with variable names
-
Err on the side of verbosity. It's better to be overly clear than unclear
-
Don't prefix variables with words like
myorthis -
Use
camelCasewhen naming variables (nosnake_case)
-
Be descriptive with function names
-
Be consistent with function names
-
Prefix private function names with an underscore
_pushToStoreinstead ofpushToStore -
Variables passed in callback functions can be less descriptive (this is mostly true for rejected promises or any other error handler, a simple
ewill convey an instance of anError)
- Use
kebab-casefor file and directory names