From 426868fdc70daa2996e35416190dc3835360da85 Mon Sep 17 00:00:00 2001 From: Abid Uzair Date: Sat, 10 Feb 2018 08:40:27 +0530 Subject: [PATCH] Docs: clean up key-spacing docs (fixes #9900) (#9963) --- docs/rules/key-spacing.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/rules/key-spacing.md b/docs/rules/key-spacing.md index 2c4afae8cb4..6e2b90541c9 100644 --- a/docs/rules/key-spacing.md +++ b/docs/rules/key-spacing.md @@ -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.