Skip to content

Commit

Permalink
Docs: added less confusing explanation for func-style (fixes #12900) (#…
Browse files Browse the repository at this point in the history
…13004)

* Docs: added less confusing explanation for func-style

* Docs: updated func-style allowArrowFunctions info
  • Loading branch information
anikethsaha authored Mar 10, 2020
1 parent 26267ed commit 79ac6cd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/rules/func-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ This rule has a string option:

This rule has an object option for an exception:

* `"allowArrowFunctions": true` (default `false`) allows the use of arrow functions (honoured only when using `declaration`)
* `"allowArrowFunctions"`: `true` (default `false`) allows the use of arrow functions. This option applies only when the string option is set to `"declaration"` (arrow functions are always allowed when the string option is set to `"expression"`, regardless of this option)

### expression

Expand All @@ -79,6 +79,8 @@ var foo = function() {
};

var foo = () => {};

// allowed as allowArrowFunctions : false is applied only for declaration
```

### declaration
Expand Down

0 comments on commit 79ac6cd

Please sign in to comment.