Skip to content

Commit

Permalink
Docs: clean up key-spacing docs (fixes #9900) (#9963)
Browse files Browse the repository at this point in the history
  • Loading branch information
abiduzz420 authored and not-an-aardvark committed Feb 10, 2018
1 parent 4a6f22e commit 426868f
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions docs/rules/key-spacing.md
Expand Up @@ -10,14 +10,18 @@ This rule enforces consistent spacing between keys and values in object literal

This rule has an object option:

* `"beforeColon": false` (default) disallows spaces between the key and the colon in object literals.
* `"beforeColon": true` requires at least one space between the key and the colon in object literals.
* `"afterColon": true` (default) requires at least one space between the colon and the value in object literals.
* `"afterColon": false` disallows spaces between the colon and the value in object literals.
* `"mode": "strict"` (default) enforces exactly one space before or after colons in object literals.
* `"mode": "minimum"` enforces one or more spaces before or after colons in object literals.
* `"align": "value"` enforces horizontal alignment of values in object literals.
* `"align": "colon"` enforces horizontal alignment of both colons and values in object literals.
* `"beforeColon": false (default) | true`
* `false`: disallows spaces between the key and the colon in object literals.
* `true`: requires at least one space between the key and the colon in object literals.
* `"afterColon": true (default) | false`
* `true`: requires at least one space between the colon and the value in object literals.
* `false`: disallows spaces between the colon and the value in object literals.
* `"mode": "strict" (default) | "miniumum"`
* `"strict"`: enforces exactly one space before or after colons in object literals.
* `"minimum"`: enforces one or more spaces before or after colons in object literals.
* `"align": "value" | "colon"`
* `"value"`: enforces horizontal alignment of values in object literals.
* `"colon"` enforces horizontal alignment of both colons and values in object literals.
* `"align"` with an object value allows for fine-grained spacing when values are being aligned in object literals.
* `"singleLine"` specifies a spacing style for single-line object literals.
* `"multiLine"` specifies a spacing style for multi-line object literals.
Expand Down

0 comments on commit 426868f

Please sign in to comment.