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/noNamespaceRule.js | |
parent | 5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff) |
node_modules
Diffstat (limited to 'node_modules/tslint/lib/rules/noNamespaceRule.js')
-rw-r--r-- | node_modules/tslint/lib/rules/noNamespaceRule.js | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/node_modules/tslint/lib/rules/noNamespaceRule.js b/node_modules/tslint/lib/rules/noNamespaceRule.js index a930e3034..381a211d9 100644 --- a/node_modules/tslint/lib/rules/noNamespaceRule.js +++ b/node_modules/tslint/lib/rules/noNamespaceRule.js @@ -31,30 +31,30 @@ var Rule = (function (_super) { allowDeclarations: this.ruleArguments.indexOf(OPTION_ALLOW_DECLARATIONS) !== -1, }); }; + /* tslint:disable:object-literal-sort-keys */ + Rule.metadata = { + ruleName: "no-namespace", + description: "Disallows use of internal \`module\`s and \`namespace\`s.", + descriptionDetails: "This rule still allows the use of `declare module ... {}`", + rationale: (_a = ["\n ES6-style external modules are the standard way to modularize code.\n Using `module {}` and `namespace {}` are outdated ways to organize TypeScript code."], _a.raw = ["\n ES6-style external modules are the standard way to modularize code.\n Using \\`module {}\\` and \\`namespace {}\\` are outdated ways to organize TypeScript code."], Lint.Utils.dedent(_a)), + optionsDescription: (_b = ["\n One argument may be optionally provided:\n\n * `", "` allows `declare namespace ... {}` to describe external APIs."], _b.raw = ["\n One argument may be optionally provided:\n\n * \\`", "\\` allows \\`declare namespace ... {}\\` to describe external APIs."], Lint.Utils.dedent(_b, OPTION_ALLOW_DECLARATIONS)), + options: { + type: "array", + items: { + type: "string", + enum: [OPTION_ALLOW_DECLARATIONS], + }, + minLength: 0, + maxLength: 1, + }, + optionExamples: [true, [true, OPTION_ALLOW_DECLARATIONS]], + type: "typescript", + typescriptOnly: true, + }; + /* tslint:enable:object-literal-sort-keys */ + Rule.FAILURE_STRING = "'namespace' and 'module' are disallowed"; return Rule; }(Lint.Rules.AbstractRule)); -/* tslint:disable:object-literal-sort-keys */ -Rule.metadata = { - ruleName: "no-namespace", - description: "Disallows use of internal \`module\`s and \`namespace\`s.", - descriptionDetails: "This rule still allows the use of `declare module ... {}`", - rationale: (_a = ["\n ES6-style external modules are the standard way to modularize code.\n Using `module {}` and `namespace {}` are outdated ways to organize TypeScript code."], _a.raw = ["\n ES6-style external modules are the standard way to modularize code.\n Using \\`module {}\\` and \\`namespace {}\\` are outdated ways to organize TypeScript code."], Lint.Utils.dedent(_a)), - optionsDescription: (_b = ["\n One argument may be optionally provided:\n\n * `", "` allows `declare namespace ... {}` to describe external APIs."], _b.raw = ["\n One argument may be optionally provided:\n\n * \\`", "\\` allows \\`declare namespace ... {}\\` to describe external APIs."], Lint.Utils.dedent(_b, OPTION_ALLOW_DECLARATIONS)), - options: { - type: "array", - items: { - type: "string", - enum: [OPTION_ALLOW_DECLARATIONS], - }, - minLength: 0, - maxLength: 1, - }, - optionExamples: [true, [true, OPTION_ALLOW_DECLARATIONS]], - type: "typescript", - typescriptOnly: true, -}; -/* tslint:enable:object-literal-sort-keys */ -Rule.FAILURE_STRING = "'namespace' and 'module' are disallowed"; exports.Rule = Rule; function walk(ctx) { // Ignore all .d.ts files by returning and not walking their ASTs. |