Skip to content

Commit

Permalink
Docs: update block-spacing details (fixes #8743) (#9375)
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorHom authored and not-an-aardvark committed Oct 11, 2017
1 parent 6767857 commit 51360c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions docs/rules/block-spacing.md
@@ -1,8 +1,8 @@
# Disallow or enforce spaces inside of single line blocks (block-spacing)
# Disallow or enforce spaces inside of blocks after opening block and before closing block (block-spacing)

## Rule Details

This rule enforces consistent spacing inside single-line blocks.
This rule enforces consistent spacing inside an open block token and the next token on the same line. This rule also enforces consistent spacing inside a close block token and previous token on the same line.

## Options

Expand All @@ -20,6 +20,9 @@ Examples of **incorrect** code for this rule with the default `"always"` option:

function foo() {return true;}
if (foo) { bar = 0;}
function baz() {let i = 0;
return i;
}
```

Examples of **correct** code for this rule with the default `"always"` option:
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/block-spacing.js
Expand Up @@ -14,7 +14,7 @@ const util = require("../ast-utils");
module.exports = {
meta: {
docs: {
description: "enforce consistent spacing inside single-line blocks",
description: "disallow or enforce spaces inside of blocks after opening block and before closing block",
category: "Stylistic Issues",
recommended: false
},
Expand Down

0 comments on commit 51360c8

Please sign in to comment.