Skip to content

Commit 79ac6cd

Browse files
authoredMar 10, 2020
Docs: added less confusing explanation for func-style (fixes #12900) (#13004)
* Docs: added less confusing explanation for func-style * Docs: updated func-style allowArrowFunctions info
1 parent 26267ed commit 79ac6cd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎docs/rules/func-style.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ This rule has a string option:
5555

5656
This rule has an object option for an exception:
5757

58-
* `"allowArrowFunctions": true` (default `false`) allows the use of arrow functions (honoured only when using `declaration`)
58+
* `"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)
5959

6060
### expression
6161

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

8181
var foo = () => {};
82+
83+
// allowed as allowArrowFunctions : false is applied only for declaration
8284
```
8385

8486
### declaration

0 commit comments

Comments
 (0)
Please sign in to comment.