Browse Source

docs: document JS constant naming (#20892)

John Kleinschmidt 5 years ago
parent
commit
04da8a10eb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      docs/development/coding-style.md

+ 1 - 1
docs/development/coding-style.md

@@ -54,7 +54,7 @@ formatted correctly.
   the `module-name` form. This rule only applies to `.js` files.
 * Use newer ES6/ES2015 syntax where appropriate
   * [`const`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const)
-    for requires and other constants
+    for requires and other constants.  If the value is a primitive, use uppercase naming (eg `const NUMBER_OF_RETRIES = 5`).
   * [`let`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let)
     for defining variables
   * [Arrow functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions)