diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:01:11 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:02:09 +0200 |
commit | 363723fc84f7b8477592e0105aeb331ec9a017af (patch) | |
tree | 29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/tslint/lib/rules/noInternalModuleRule.js | |
parent | 5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff) |
node_modules
Diffstat (limited to 'node_modules/tslint/lib/rules/noInternalModuleRule.js')
-rw-r--r-- | node_modules/tslint/lib/rules/noInternalModuleRule.js | 30 |
1 files changed, 15 insertions, 15 deletions
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 |