From 52e8d9c60bfb82a0774256084f69b12582cdf0e7 Mon Sep 17 00:00:00 2001 From: Matthew Dunsdon Date: Sat, 3 Sep 2016 10:17:30 +0100 Subject: [PATCH] Docs: Clean up sort-vars (#7045) --- docs/rules/sort-vars.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/docs/rules/sort-vars.md b/docs/rules/sort-vars.md index 1bcfad4c86e..01b4d4e440f 100644 --- a/docs/rules/sort-vars.md +++ b/docs/rules/sort-vars.md @@ -7,7 +7,7 @@ When declaring multiple variables within the same block, some developers prefer This rule checks all variable declaration blocks and verifies that all variables are sorted alphabetically. The default configuration of the rule is case-sensitive. -The following patterns are considered problems: +Examples of **incorrect** code for this rule: ```js /*eslint sort-vars: "error"*/ @@ -19,7 +19,7 @@ var a, B, c; var a, A; ``` -The following patterns are not considered problems: +Examples of **correct** code for this rule: ```js /*eslint sort-vars: "error"*/ @@ -52,15 +52,13 @@ var c, d, a, e; ## Options -``` -"sort-vars": [, { "ignoreCase": }] -``` +This rule has an object option: -### `ignoreCase` +* `"ignoreCase": true` (default `false`) ignores the case-sensitivity of the variables order -When `true` the rule ignores the case-sensitivity of the variables order. +### ignoreCase -The following patterns are not considered problems: +Examples of **correct** code for this rule with the `{ "ignoreCase": true }` option: ```js /*eslint sort-vars: ["error", { "ignoreCase": true }]*/