Skip to content

Commit

Permalink
Docs: space-in-parens examples with no arguments etc. (#13987)
Browse files Browse the repository at this point in the history
  • Loading branch information
brodybits committed Jan 10, 2021
1 parent 3e49169 commit 4a38bbe
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/rules/space-in-parens.md
Expand Up @@ -36,10 +36,14 @@ Examples of **incorrect** code for this rule with the default `"never"` option:
```js
/*eslint space-in-parens: ["error", "never"]*/

foo( );

foo( 'bar');
foo('bar' );
foo( 'bar' );

foo( /* bar */ );

var foo = ( 1 + 2 ) * 3;
( function () { return 'bar'; }() );
```
Expand All @@ -53,6 +57,8 @@ foo();

foo('bar');

foo(/* bar */);

var foo = (1 + 2) * 3;
(function () { return 'bar'; }());
```
Expand All @@ -68,6 +74,8 @@ foo( 'bar');
foo('bar' );
foo('bar');

foo(/* bar */);

var foo = (1 + 2) * 3;
(function () { return 'bar'; }());
```
Expand All @@ -78,9 +86,12 @@ Examples of **correct** code for this rule with the `"always"` option:
/*eslint space-in-parens: ["error", "always"]*/

foo();
foo( );

foo( 'bar' );

foo( /* bar */ );

var foo = ( 1 + 2 ) * 3;
( function () { return 'bar'; }() );
```
Expand Down

0 comments on commit 4a38bbe

Please sign in to comment.