From 363723fc84f7b8477592e0105aeb331ec9a017af Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 14 Aug 2017 05:01:11 +0200 Subject: node_modules --- node_modules/tslint/lib/rules/preferSwitchRule.js | 34 +++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'node_modules/tslint/lib/rules/preferSwitchRule.js') diff --git a/node_modules/tslint/lib/rules/preferSwitchRule.js b/node_modules/tslint/lib/rules/preferSwitchRule.js index da57daad9..feac8dd80 100644 --- a/node_modules/tslint/lib/rules/preferSwitchRule.js +++ b/node_modules/tslint/lib/rules/preferSwitchRule.js @@ -34,25 +34,25 @@ var Rule = (function (_super) { } return this.applyWithFunction(sourceFile, walk, minCases); }; + /* tslint:disable:object-literal-sort-keys */ + Rule.metadata = { + ruleName: "prefer-switch", + description: "Prefer a `switch` statement to an `if` statement with simple `===` comparisons.", + optionsDescription: (_a = ["\n An optional object with the property '", "'.\n This is the number cases needed before a switch statement is recommended.\n Defaults to 3."], _a.raw = ["\n An optional object with the property '", "'.\n This is the number cases needed before a switch statement is recommended.\n Defaults to 3."], Lint.Utils.dedent(_a, OPTION_MIN_CASES)), + options: { + type: "object", + properties: (_b = {}, + _b[OPTION_MIN_CASES] = { type: "number" }, + _b), + }, + optionExamples: [true, [true, (_c = {}, _c[OPTION_MIN_CASES] = 2, _c)]], + type: "style", + typescriptOnly: false, + }; + /* tslint:enable:object-literal-sort-keys */ + Rule.FAILURE_STRING = "Use a switch statement instead of using multiple '===' checks."; return Rule; }(Lint.Rules.AbstractRule)); -/* tslint:disable:object-literal-sort-keys */ -Rule.metadata = { - ruleName: "prefer-switch", - description: "Prefer a `switch` statement to an `if` statement with simple `===` comparisons.", - optionsDescription: (_a = ["\n An optional object with the property '", "'.\n This is the number cases needed before a switch statement is recommended.\n Defaults to 3."], _a.raw = ["\n An optional object with the property '", "'.\n This is the number cases needed before a switch statement is recommended.\n Defaults to 3."], Lint.Utils.dedent(_a, OPTION_MIN_CASES)), - options: { - type: "object", - properties: (_b = {}, - _b[OPTION_MIN_CASES] = { type: "number" }, - _b), - }, - optionExamples: [true, [true, (_c = {}, _c[OPTION_MIN_CASES] = 2, _c)]], - type: "style", - typescriptOnly: false, -}; -/* tslint:enable:object-literal-sort-keys */ -Rule.FAILURE_STRING = "Use a switch statement instead of using multiple '===' checks."; exports.Rule = Rule; function walk(ctx) { var minCases = ctx.options, sourceFile = ctx.sourceFile; -- cgit v1.2.3