[guide] Add ESlint rules to 'always use const' and 'decriptive variable names' topics

This commit is contained in:
felipethome
2016-08-04 14:13:12 -03:00
parent dc7e7e77f2
commit 030598db09

View File

@@ -1299,7 +1299,7 @@ Other Style Guides
## Variables
<a name="variables--const"></a><a name="13.1"></a>
- [13.1](#variables--const) Always use `const` to declare variables. Not doing so will result in global variables. We want to avoid polluting the global namespace. Captain Planet warned us of that.
- [13.1](#variables--const) Always use `const` to declare variables. Not doing so will result in global variables. We want to avoid polluting the global namespace. Captain Planet warned us of that. eslint: [`no-undef`](http://eslint.org/docs/rules/no-undef) [`prefer-const`](http://eslint.org/docs/rules/prefer-const)
```javascript
// bad
@@ -2327,7 +2327,7 @@ Other Style Guides
## Naming Conventions
<a name="naming--descriptive"></a><a name="22.1"></a>
- [22.1](#naming--descriptive) Avoid single letter names. Be descriptive with your naming.
- [22.1](#naming--descriptive) Avoid single letter names. Be descriptive with your naming. eslint: [`id-length`](http://eslint.org/docs/rules/id-length)
```javascript
// bad