From 79ac6cd2d8e4c32e03dfea10a957806845058573 Mon Sep 17 00:00:00 2001 From: Anix Date: Tue, 10 Mar 2020 23:01:29 +0530 Subject: [PATCH] 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 --- docs/rules/func-style.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/rules/func-style.md b/docs/rules/func-style.md index e17fecf8f82..c197403d989 100644 --- a/docs/rules/func-style.md +++ b/docs/rules/func-style.md @@ -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 @@ -79,6 +79,8 @@ var foo = function() { }; var foo = () => {}; + +// allowed as allowArrowFunctions : false is applied only for declaration ``` ### declaration