From bfd7f0b900753b29ae4b5d7277c36e95c41b6f5a Mon Sep 17 00:00:00 2001 From: abiduzz420 Date: Fri, 9 Feb 2018 21:38:37 +0530 Subject: [PATCH 1/3] clean up key-spacing doc.(#9900) --- docs/rules/key-spacing.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/docs/rules/key-spacing.md b/docs/rules/key-spacing.md index 2c4afae8cb4..cfa659ca0d3 100644 --- a/docs/rules/key-spacing.md +++ b/docs/rules/key-spacing.md @@ -9,15 +9,18 @@ This rule enforces consistent spacing between keys and values in object literal ## Options 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. From 0adac46c809b2861f41ce452d5adbfd86a03ffb7 Mon Sep 17 00:00:00 2001 From: abiduzz420 Date: Fri, 9 Feb 2018 21:56:58 +0530 Subject: [PATCH 2/3] markdown errors fixed --- docs/rules/key-spacing.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/docs/rules/key-spacing.md b/docs/rules/key-spacing.md index cfa659ca0d3..6e2b90541c9 100644 --- a/docs/rules/key-spacing.md +++ b/docs/rules/key-spacing.md @@ -9,18 +9,19 @@ This rule enforces consistent spacing between keys and values in object literal ## Options This rule has an object option: -* `"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. + +* `"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. + * `"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. From d57bbf994078befaf0e60632ce935bddcf4dde81 Mon Sep 17 00:00:00 2001 From: abiduzz420 Date: Fri, 9 Feb 2018 21:38:37 +0530 Subject: [PATCH 3/3] Docs: clean up key-spacing docs (fixes #9900) --- 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.