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/noUnnecessaryInitializerRule.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'node_modules/tslint/lib/rules/noUnnecessaryInitializerRule.js') diff --git a/node_modules/tslint/lib/rules/noUnnecessaryInitializerRule.js b/node_modules/tslint/lib/rules/noUnnecessaryInitializerRule.js index 794c668fb..110938857 100644 --- a/node_modules/tslint/lib/rules/noUnnecessaryInitializerRule.js +++ b/node_modules/tslint/lib/rules/noUnnecessaryInitializerRule.js @@ -36,6 +36,7 @@ var Rule = /** @class */ (function (_super) { optionsDescription: "Not configurable.", options: null, optionExamples: [true], + rationale: Lint.Utils.dedent(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n Values in JavaScript default to `undefined`.\n There's no need to do so manually.\n "], ["\n Values in JavaScript default to \\`undefined\\`.\n There's no need to do so manually.\n "]))), type: "style", typescriptOnly: false, }; @@ -53,7 +54,7 @@ function walk(ctx) { checkInitializer(node); break; case ts.SyntaxKind.VariableDeclaration: - if (!tsutils_1.isBindingPattern(node.name) && !Lint.isNodeFlagSet(node.parent, ts.NodeFlags.Const)) { + if (!tsutils_1.isBindingPattern(node.name) && !tsutils_1.isNodeFlagSet(node.parent, ts.NodeFlags.Const)) { checkInitializer(node); } break; @@ -82,7 +83,7 @@ function walk(ctx) { } } function failWithFix(node) { - var fix = Lint.Replacement.deleteFromTo(Lint.childOfKind(node, ts.SyntaxKind.EqualsToken).pos, node.end); + var fix = Lint.Replacement.deleteFromTo(tsutils_1.getChildOfKind(node, ts.SyntaxKind.EqualsToken).pos, node.end); ctx.addFailureAtNode(node, Rule.FAILURE_STRING, fix); } } @@ -102,3 +103,4 @@ function isUndefined(node) { node.kind === ts.SyntaxKind.Identifier && node.originalKeywordKind === ts.SyntaxKind.UndefinedKeyword; } +var templateObject_1; -- cgit v1.2.3