From e51e2b36f862b3d68984b4e76705f14e31a056c0 Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Thu, 4 May 2017 19:00:39 -0700 Subject: [PATCH] Fix some optionExamples: Use values, not strings --- src/rules/noIrregularWhitespaceRule.ts | 2 +- src/rules/numberLiteralFormatRule.ts | 2 +- src/rules/preferSwitchRule.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rules/noIrregularWhitespaceRule.ts b/src/rules/noIrregularWhitespaceRule.ts index 0e05856d4a8..1cd250cf7d8 100644 --- a/src/rules/noIrregularWhitespaceRule.ts +++ b/src/rules/noIrregularWhitespaceRule.ts @@ -27,7 +27,7 @@ export class Rule extends Lint.Rules.AbstractRule { hasFix: true, optionsDescription: "Not configurable.", options: null, - optionExamples: ["true"], + optionExamples: [true], type: "style", typescriptOnly: false, }; diff --git a/src/rules/numberLiteralFormatRule.ts b/src/rules/numberLiteralFormatRule.ts index ab0695c9090..aec43a4ed67 100644 --- a/src/rules/numberLiteralFormatRule.ts +++ b/src/rules/numberLiteralFormatRule.ts @@ -28,7 +28,7 @@ export class Rule extends Lint.Rules.AbstractRule { description: "Checks that decimal literals should begin with '0.' instead of just '.', and should not end with a trailing '0'.", optionsDescription: "Not configurable.", options: null, - optionExamples: ["true"], + optionExamples: [true], type: "style", typescriptOnly: false, }; diff --git a/src/rules/preferSwitchRule.ts b/src/rules/preferSwitchRule.ts index d1a06ff58f3..235550e4cad 100644 --- a/src/rules/preferSwitchRule.ts +++ b/src/rules/preferSwitchRule.ts @@ -37,7 +37,7 @@ export class Rule extends Lint.Rules.AbstractRule { [OPTION_MIN_CASES]: { type: "number" }, }, }, - optionExamples: ["true", `["true", { "${OPTION_MIN_CASES}": 2 }]`], + optionExamples: [true, [true, { [OPTION_MIN_CASES]: 2 }]], type: "style", typescriptOnly: false, };