docs: document JS constant naming (#20892)
This commit is contained in:
parent
85647dfced
commit
04da8a10eb
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue