From 363723fc84f7b8477592e0105aeb331ec9a017af Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 14 Aug 2017 05:01:11 +0200 Subject: node_modules --- .../tslint/lib/rules/noInternalModuleRule.js | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'node_modules/tslint/lib/rules/noInternalModuleRule.js') diff --git a/node_modules/tslint/lib/rules/noInternalModuleRule.js b/node_modules/tslint/lib/rules/noInternalModuleRule.js index 33be12aed..85efb2530 100644 --- a/node_modules/tslint/lib/rules/noInternalModuleRule.js +++ b/node_modules/tslint/lib/rules/noInternalModuleRule.js @@ -27,22 +27,22 @@ var Rule = (function (_super) { Rule.prototype.apply = function (sourceFile) { return this.applyWithWalker(new NoInternalModuleWalker(sourceFile, this.ruleName, undefined)); }; + /* tslint:disable:object-literal-sort-keys */ + Rule.metadata = { + ruleName: "no-internal-module", + description: "Disallows internal `module`", + rationale: "Using `module` leads to a confusion of concepts with external modules. Use the newer `namespace` keyword instead.", + optionsDescription: "Not configurable.", + options: null, + optionExamples: [true], + type: "typescript", + typescriptOnly: true, + hasFix: true, + }; + /* tslint:enable:object-literal-sort-keys */ + Rule.FAILURE_STRING = "The internal 'module' syntax is deprecated, use the 'namespace' keyword instead."; return Rule; }(Lint.Rules.AbstractRule)); -/* tslint:disable:object-literal-sort-keys */ -Rule.metadata = { - ruleName: "no-internal-module", - description: "Disallows internal `module`", - rationale: "Using `module` leads to a confusion of concepts with external modules. Use the newer `namespace` keyword instead.", - optionsDescription: "Not configurable.", - options: null, - optionExamples: [true], - type: "typescript", - typescriptOnly: true, - hasFix: true, -}; -/* tslint:enable:object-literal-sort-keys */ -Rule.FAILURE_STRING = "The internal 'module' syntax is deprecated, use the 'namespace' keyword instead."; exports.Rule = Rule; var NoInternalModuleWalker = (function (_super) { tslib_1.__extends(NoInternalModuleWalker, _super); @@ -61,7 +61,7 @@ var NoInternalModuleWalker = (function (_super) { } }; NoInternalModuleWalker.prototype.checkModuleDeclaration = function (node, nested) { - if (nested !== true && + if (!nested && node.name.kind === ts.SyntaxKind.Identifier && !Lint.isNodeFlagSet(node, ts.NodeFlags.Namespace) && // augmenting global uses a special syntax that is allowed -- cgit v1.2.3