From bbff7403fbf46f9ad92240ac213df8d30ef31b64 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 20 Sep 2018 02:56:13 +0200 Subject: update packages --- node_modules/tslint/lib/rules/noDuplicateVariableRule.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'node_modules/tslint/lib/rules/noDuplicateVariableRule.js') diff --git a/node_modules/tslint/lib/rules/noDuplicateVariableRule.js b/node_modules/tslint/lib/rules/noDuplicateVariableRule.js index f546ddfc4..54a053387 100644 --- a/node_modules/tslint/lib/rules/noDuplicateVariableRule.js +++ b/node_modules/tslint/lib/rules/noDuplicateVariableRule.js @@ -39,9 +39,9 @@ var Rule = /** @class */ (function (_super) { Rule.metadata = { ruleName: "no-duplicate-variable", description: "Disallows duplicate variable declarations in the same block scope.", - descriptionDetails: (_a = ["\n This rule is only useful when using the `var` keyword -\n the compiler will detect redeclarations of `let` and `const` variables."], _a.raw = ["\n This rule is only useful when using the \\`var\\` keyword -\n the compiler will detect redeclarations of \\`let\\` and \\`const\\` variables."], Lint.Utils.dedent(_a)), - rationale: (_b = ["\n A variable can be reassigned if necessary -\n there's no good reason to have a duplicate variable declaration."], _b.raw = ["\n A variable can be reassigned if necessary -\n there's no good reason to have a duplicate variable declaration."], Lint.Utils.dedent(_b)), - optionsDescription: "You can specify `\"" + OPTION_CHECK_PARAMETERS + "\"` to check for variables with the same name as a paramter.", + descriptionDetails: Lint.Utils.dedent(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n This rule is only useful when using the `var` keyword -\n the compiler will detect redeclarations of `let` and `const` variables."], ["\n This rule is only useful when using the \\`var\\` keyword -\n the compiler will detect redeclarations of \\`let\\` and \\`const\\` variables."]))), + rationale: Lint.Utils.dedent(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n A variable can be reassigned if necessary -\n there's no good reason to have a duplicate variable declaration."], ["\n A variable can be reassigned if necessary -\n there's no good reason to have a duplicate variable declaration."]))), + optionsDescription: "You can specify `\"" + OPTION_CHECK_PARAMETERS + "\"` to check for variables with the same name as a parameter.", options: { type: "string", enum: [OPTION_CHECK_PARAMETERS], @@ -59,7 +59,9 @@ exports.Rule = Rule; var NoDuplicateVariableWalker = /** @class */ (function (_super) { tslib_1.__extends(NoDuplicateVariableWalker, _super); function NoDuplicateVariableWalker() { - return _super !== null && _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.scope = new Set(); + return _this; } NoDuplicateVariableWalker.prototype.walk = function (sourceFile) { var _this = this; @@ -105,4 +107,4 @@ var NoDuplicateVariableWalker = /** @class */ (function (_super) { }; return NoDuplicateVariableWalker; }(Lint.AbstractWalker)); -var _a, _b; +var templateObject_1, templateObject_2; -- cgit v1.2.3