diff options
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) { |