Updated wording of variable--one-const rule

This commit is contained in:
Parul Gupta
2018-10-02 16:26:25 +05:30
parent 32a7bf44c2
commit 9af5ee89eb

View File

@@ -1581,7 +1581,7 @@ Other Style Guides
```
<a name="variables--one-const"></a><a name="13.2"></a>
- [13.2](#variables--one-const) Use one `const` or `let` declaration per variable. eslint: [`one-var`](https://eslint.org/docs/rules/one-var.html)
- [13.2](#variables--one-const) Use one `const` or `let` declaration per variable or assignment. eslint: [`one-var`](https://eslint.org/docs/rules/one-var.html)
> Why? Its easier to add new variable declarations this way, and you never have to worry about swapping out a `;` for a `,` or introducing punctuation-only diffs. You can also step through each declaration with the debugger, instead of jumping through all of them at once.