From c596690b87f4f57a4763ce97d353a45a64e1f30d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=B2a=20Tr=E1=BA=A7n?= Date: Tue, 7 Feb 2017 23:37:58 +0700 Subject: [PATCH] Docs: Clarify generator-star-spacing config example (fixes #8027) (#8034) --- docs/rules/generator-star-spacing.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/rules/generator-star-spacing.md b/docs/rules/generator-star-spacing.md index c98a4dd76cf6..4416cdad6697 100644 --- a/docs/rules/generator-star-spacing.md +++ b/docs/rules/generator-star-spacing.md @@ -58,8 +58,10 @@ The rule takes one option, an object, which has two keys `before` and `after` ha The default is `{"before": true, "after": false}`. +An example configuration: + ```json -"generator-star-spacing": ["error", {"before": false, "after": true}] +"generator-star-spacing": ["error", {"before": true, "after": false}] ``` And the option has shorthand as a string keyword: @@ -69,6 +71,8 @@ And the option has shorthand as a string keyword: * `{"before": true, "after": true}` → `"both"` * `{"before": false, "after": false}` → `"neither"` +An example of shorthand configuration: + ```json "generator-star-spacing": ["error", "after"] ```