Skip to content

Commit c72b418

Browse files
hshoffhibearpanda
authored andcommitted
[7.1] add link to fn names discussion. fixes airbnb#794
1 parent 9dc1675 commit c72b418

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ Other Style Guides
555555
<a name="functions--declarations"></a><a name="7.1"></a>
556556
- [7.1](#functions--declarations) Use function declarations instead of function expressions. eslint: [`func-style`](http://eslint.org/docs/rules/func-style) jscs: [`requireFunctionDeclarations`](http://jscs.info/rule/requireFunctionDeclarations)
557557
558-
> Why? Function declarations are named, so they're easier to identify in call stacks. Also, the whole body of a function declaration is hoisted, whereas only the reference of a function expression is hoisted. This rule makes it possible to always use [Arrow Functions](#arrow-functions) in place of function expressions.
558+
> Why? Function declarations are named, so they're easier to identify in call stacks. Also, the whole body of a function declaration is hoisted, whereas only the reference of a function expression is hoisted. This rule makes it possible to always use [Arrow Functions](#arrow-functions) in place of function expressions. ([discussion](https://github.com/airbnb/javascript/issues/794))
559559
560560
```javascript
561561
// bad
@@ -2221,7 +2221,6 @@ Other Style Guides
22212221
- [19.2](#commas--dangling) Additional trailing comma: **Yup.** eslint: [`comma-dangle`](http://eslint.org/docs/rules/comma-dangle.html) jscs: [`requireTrailingComma`](http://jscs.info/rule/requireTrailingComma)
22222222

22232223
> Why? This leads to cleaner git diffs. Also, transpilers like Babel will remove the additional trailing comma in the transpiled code which means you don't have to worry about the [trailing comma problem](es5/README.md#commas) in legacy browsers.
2224-
22252224
```javascript
22262225
// bad - git diff without trailing comma
22272226
const hero = {

0 commit comments

Comments
 (0)