mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-14 07:47:54 -05:00
Merge pull request #675 from simono/patch-1
[guide] 7.3: Add Link to eslint rule.
This commit is contained in:
@@ -517,6 +517,8 @@ Other Style Guides
|
||||
|
||||
- [7.3](#7.3) <a name='7.3'></a> Never declare a function in a non-function block (if, while, etc). Assign the function to a variable instead. Browsers will allow you to do it, but they all interpret it differently, which is bad news bears.
|
||||
|
||||
eslint rules: [`no-loop-func`](http://eslint.org/docs/rules/no-loop-func.html).
|
||||
|
||||
- [7.4](#7.4) <a name='7.4'></a> **Note:** ECMA-262 defines a `block` as a list of statements. A function declaration is not a statement. [Read ECMA-262's note on this issue](http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=97).
|
||||
|
||||
```javascript
|
||||
|
||||
Reference in New Issue
Block a user