aboutsummaryrefslogtreecommitdiff
path: root/node_modules/tslint/lib/rules/noInternalModuleRule.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/tslint/lib/rules/noInternalModuleRule.js')
-rw-r--r--node_modules/tslint/lib/rules/noInternalModuleRule.js30
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