Skip to content

Commit

Permalink
Docs: Fix rest-spread-spacing's name (#6365)
Browse files Browse the repository at this point in the history
  • Loading branch information
waldreiter authored and hzoo committed Jun 13, 2016
1 parent cfdd524 commit 0e7ce72
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions docs/rules/rest-spread-spacing.md
Expand Up @@ -67,19 +67,19 @@ This rule takes one option: a string with the value of `"never"` or `"always"`.
When using the default `"never"` option, whitespace is not allowed between spread operators and their expressions.

```json
spread-spacing: ["error"]
rest-spread-spacing: ["error"]
```

or

```json
spread-spacing: ["error", "never"]
rest-spread-spacing: ["error", "never"]
```

Examples of **incorrect** code for this rule with `"never"`:

```js
/*eslint spread-spacing: ["error", "never"]*/
/*eslint rest-spread-spacing: ["error", "never"]*/

fn(... args)
[... arr, 4, 5, 6]
Expand All @@ -92,7 +92,7 @@ let n = { x, y, ... z };
Examples of **correct** code for this rule with `"never"`:

```js
/*eslint spread-spacing: ["error", "never"]*/
/*eslint rest-spread-spacing: ["error", "never"]*/

fn(...args)
[...arr, 4, 5, 6]
Expand All @@ -107,13 +107,13 @@ let n = { x, y, ...z };
When using the `"always"` option, whitespace is required between spread operators and their expressions.

```json
spread-spacing: ["error", "always"]
rest-spread-spacing: ["error", "always"]
```

Examples of **incorrect** code for this rule with `"always"`:

```js
/*eslint spread-spacing:["error", "always"]*/
/*eslint rest-spread-spacing:["error", "always"]*/

fn(...args)
[...arr, 4, 5, 6]
Expand All @@ -126,7 +126,7 @@ let n = { x, y, ...z };
Examples of **correct** code for this rule with `"always"`:

```js
/*eslint spread-spacing: ["error", "always"]*/
/*eslint rest-spread-spacing: ["error", "always"]*/

fn(... args)
[... arr, 4, 5, 6]
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/rules/rest-spread-spacing.js
Expand Up @@ -14,7 +14,7 @@ var rule = require("../../../lib/rules/rest-spread-spacing"),

var ruleTester = new RuleTester();

ruleTester.run("spread-spacing", rule, {
ruleTester.run("rest-spread-spacing", rule, {
valid: [
{ code: "fn(...args)", parserOptions: { ecmaVersion: 6 } },
{ code: "fn(...(args))", parserOptions: { ecmaVersion: 6 } },
Expand Down

0 comments on commit 0e7ce72

Please sign in to comment.