From 363723fc84f7b8477592e0105aeb331ec9a017af Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 14 Aug 2017 05:01:11 +0200 Subject: node_modules --- .../lib/rules/noUnnecessaryInitializerRule.js | 31 +++++++++++----------- 1 file changed, 15 insertions(+), 16 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 b147fe076..e02c3a905 100644 --- a/node_modules/tslint/lib/rules/noUnnecessaryInitializerRule.js +++ b/node_modules/tslint/lib/rules/noUnnecessaryInitializerRule.js @@ -28,23 +28,23 @@ var Rule = (function (_super) { Rule.prototype.apply = function (sourceFile) { return this.applyWithFunction(sourceFile, walk); }; + /* tslint:disable:object-literal-sort-keys */ + Rule.metadata = { + ruleName: "no-unnecessary-initializer", + description: "Forbids a 'var'/'let' statement or destructuring initializer to be initialized to 'undefined'.", + hasFix: true, + optionsDescription: "Not configurable.", + options: null, + optionExamples: [true], + type: "style", + typescriptOnly: false, + }; + /* tslint:enable:object-literal-sort-keys */ + Rule.FAILURE_STRING = "Unnecessary initialization to 'undefined'."; + Rule.FAILURE_STRING_PARAMETER = "Use an optional parameter instead of initializing to 'undefined'. " + + "Also, the type declaration does not need to include '| undefined'."; return Rule; }(Lint.Rules.AbstractRule)); -/* tslint:disable:object-literal-sort-keys */ -Rule.metadata = { - ruleName: "no-unnecessary-initializer", - description: "Forbids a 'var'/'let' statement or destructuring initializer to be initialized to 'undefined'.", - hasFix: true, - optionsDescription: "Not configurable.", - options: null, - optionExamples: [true], - type: "style", - typescriptOnly: false, -}; -/* tslint:enable:object-literal-sort-keys */ -Rule.FAILURE_STRING = "Unnecessary initialization to 'undefined'."; -Rule.FAILURE_STRING_PARAMETER = "Use an optional parameter instead of initializing to 'undefined'. " + - "Also, the type declaration does not need to include '| undefined'."; exports.Rule = Rule; function walk(ctx) { ts.forEachChild(ctx.sourceFile, function cb(node) { @@ -72,7 +72,6 @@ function walk(ctx) { } } }); - break; } } ts.forEachChild(node, cb); -- cgit v1.2.3