diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-10-14 18:40:54 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-10-14 18:40:54 +0200 |
commit | 9df98e65f842cf3acae09cbdd969966f42d64469 (patch) | |
tree | f071d3e09a342c208fb8e1cd3f5241d64fbfbaf3 /node_modules/tslint/lib/rules/preferTemplateRule.js | |
parent | 008926b18470e7f394cd640302957b29728a9803 (diff) |
update dependencies
Diffstat (limited to 'node_modules/tslint/lib/rules/preferTemplateRule.js')
-rw-r--r-- | node_modules/tslint/lib/rules/preferTemplateRule.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/node_modules/tslint/lib/rules/preferTemplateRule.js b/node_modules/tslint/lib/rules/preferTemplateRule.js index 66eed83b7..5255a5f37 100644 --- a/node_modules/tslint/lib/rules/preferTemplateRule.js +++ b/node_modules/tslint/lib/rules/preferTemplateRule.js @@ -21,7 +21,7 @@ var tsutils_1 = require("tsutils"); var ts = require("typescript"); var Lint = require("../index"); var OPTION_SINGLE_CONCAT = "allow-single-concat"; -var Rule = (function (_super) { +var Rule = /** @class */ (function (_super) { tslib_1.__extends(Rule, _super); function Rule() { return _super !== null && _super.apply(this, arguments) || this; @@ -31,7 +31,7 @@ var Rule = (function (_super) { return []; // Not possible in a declaration file } var allowSingleConcat = this.ruleArguments.indexOf(OPTION_SINGLE_CONCAT) !== -1; - return this.applyWithFunction(sourceFile, function (ctx) { return walk(ctx, allowSingleConcat); }); + return this.applyWithFunction(sourceFile, walk, { allowSingleConcat: allowSingleConcat }); }; /* tslint:disable:object-literal-sort-keys */ Rule.metadata = { @@ -52,7 +52,8 @@ var Rule = (function (_super) { return Rule; }(Lint.Rules.AbstractRule)); exports.Rule = Rule; -function walk(ctx, allowSingleConcat) { +function walk(ctx) { + var allowSingleConcat = ctx.options.allowSingleConcat; return ts.forEachChild(ctx.sourceFile, function cb(node) { var failure = getError(node, allowSingleConcat); if (failure !== undefined) { |