From 4a38bbe81b4b29ca1a4e62d0a0cc8d525455b063 Mon Sep 17 00:00:00 2001 From: Chris Brody Date: Sun, 10 Jan 2021 00:04:54 -0500 Subject: [PATCH] Docs: space-in-parens examples with no arguments etc. (#13987) --- docs/rules/space-in-parens.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/rules/space-in-parens.md b/docs/rules/space-in-parens.md index bfc0b46ed32..ca511924726 100644 --- a/docs/rules/space-in-parens.md +++ b/docs/rules/space-in-parens.md @@ -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'; }() ); ``` @@ -53,6 +57,8 @@ foo(); foo('bar'); +foo(/* bar */); + var foo = (1 + 2) * 3; (function () { return 'bar'; }()); ``` @@ -68,6 +74,8 @@ foo( 'bar'); foo('bar' ); foo('bar'); +foo(/* bar */); + var foo = (1 + 2) * 3; (function () { return 'bar'; }()); ``` @@ -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'; }() ); ```