Skip to content

Commit

Permalink
Docs: fix func-style arrow exception option
Browse files Browse the repository at this point in the history
  • Loading branch information
craigmichaelmartin committed Mar 9, 2016
1 parent e3159a6 commit ae1ee54
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions docs/rules/func-style.md
Expand Up @@ -56,12 +56,6 @@ This is the default configuration. It reports an error when function declaratio
"func-style": [2, "expression"]
```

An additional option object can be added with a property `"allowArrowFunctions"`. Setting this to `true` will allow arrow functions.

```json
"func-style": [2, "expression", { "allowArrowFunctions": true }]
```

The following patterns are considered problems:

```js
Expand All @@ -82,12 +76,6 @@ var foo = function() {
};
```

```js
/*eslint func-style: [2, "declaration", { "allowArrowFunctions": true }]*/

var foo = () => {};
```

### "declaration"

This reports an error if any function expressions are used where function declarations are expected. You can specify to use expressions instead:
Expand All @@ -96,6 +84,12 @@ This reports an error if any function expressions are used where function declar
"func-style": [2, "declaration"]
```

An additional option object can be added with a property `"allowArrowFunctions"`. Setting this to `true` will allow arrow functions.

```json
"func-style": [2, "declaration", { "allowArrowFunctions": true }]
```

The following patterns are considered problems:

```js
Expand Down Expand Up @@ -127,6 +121,12 @@ SomeObject.foo = function() {
};
```

```js
/*eslint func-style: [2, "declaration", { "allowArrowFunctions": true }]*/

var foo = () => {};
```


## When Not To Use It

Expand Down

0 comments on commit ae1ee54

Please sign in to comment.