Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: added less confusing explanation for func-style (fixes #12900) #13004

Merged
merged 2 commits into from Mar 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/rules/func-style.md
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