From 363723fc84f7b8477592e0105aeb331ec9a017af Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 14 Aug 2017 05:01:11 +0200 Subject: node_modules --- .../lib/rules/noConditionalAssignmentRule.js | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'node_modules/tslint/lib/rules/noConditionalAssignmentRule.js') diff --git a/node_modules/tslint/lib/rules/noConditionalAssignmentRule.js b/node_modules/tslint/lib/rules/noConditionalAssignmentRule.js index 3384b8b29..cefa22d89 100644 --- a/node_modules/tslint/lib/rules/noConditionalAssignmentRule.js +++ b/node_modules/tslint/lib/rules/noConditionalAssignmentRule.js @@ -28,22 +28,22 @@ var Rule = (function (_super) { var walker = new NoConditionalAssignmentWalker(sourceFile, this.getOptions()); return this.applyWithWalker(walker); }; + /* tslint:disable:object-literal-sort-keys */ + Rule.metadata = { + ruleName: "no-conditional-assignment", + description: "Disallows any type of assignment in conditionals.", + descriptionDetails: "This applies to `do-while`, `for`, `if`, and `while` statements.", + rationale: (_a = ["\n Assignments in conditionals are often typos:\n for example `if (var1 = var2)` instead of `if (var1 == var2)`.\n They also can be an indicator of overly clever code which decreases maintainability."], _a.raw = ["\n Assignments in conditionals are often typos:\n for example \\`if (var1 = var2)\\` instead of \\`if (var1 == var2)\\`.\n They also can be an indicator of overly clever code which decreases maintainability."], Lint.Utils.dedent(_a)), + optionsDescription: "Not configurable.", + options: null, + optionExamples: [true], + type: "functionality", + typescriptOnly: false, + }; + /* tslint:enable:object-literal-sort-keys */ + Rule.FAILURE_STRING = "Assignments in conditional expressions are forbidden"; return Rule; }(Lint.Rules.AbstractRule)); -/* tslint:disable:object-literal-sort-keys */ -Rule.metadata = { - ruleName: "no-conditional-assignment", - description: "Disallows any type of assignment in conditionals.", - descriptionDetails: "This applies to `do-while`, `for`, `if`, and `while` statements.", - rationale: (_a = ["\n Assignments in conditionals are often typos:\n for example `if (var1 = var2)` instead of `if (var1 == var2)`.\n They also can be an indicator of overly clever code which decreases maintainability."], _a.raw = ["\n Assignments in conditionals are often typos:\n for example \\`if (var1 = var2)\\` instead of \\`if (var1 == var2)\\`.\n They also can be an indicator of overly clever code which decreases maintainability."], Lint.Utils.dedent(_a)), - optionsDescription: "Not configurable.", - options: null, - optionExamples: [true], - type: "functionality", - typescriptOnly: false, -}; -/* tslint:enable:object-literal-sort-keys */ -Rule.FAILURE_STRING = "Assignments in conditional expressions are forbidden"; exports.Rule = Rule; var NoConditionalAssignmentWalker = (function (_super) { tslib_1.__extends(NoConditionalAssignmentWalker, _super); -- cgit v1.2.3