aboutsummaryrefslogtreecommitdiff
path: root/node_modules/tslint/lib/rules/noDuplicateVariableRule.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
committerFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
commitbbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch)
treec58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/tslint/lib/rules/noDuplicateVariableRule.js
parent003fb34971cf63466184351b4db5f7c67df4f444 (diff)
update packages
Diffstat (limited to 'node_modules/tslint/lib/rules/noDuplicateVariableRule.js')
-rw-r--r--node_modules/tslint/lib/rules/noDuplicateVariableRule.js12
1 files changed, 7 insertions, 5 deletions
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;