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/maxClassesPerFileRule.js | |
parent | 5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff) |
node_modules
Diffstat (limited to 'node_modules/tslint/lib/rules/maxClassesPerFileRule.js')
-rw-r--r-- | node_modules/tslint/lib/rules/maxClassesPerFileRule.js | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/node_modules/tslint/lib/rules/maxClassesPerFileRule.js b/node_modules/tslint/lib/rules/maxClassesPerFileRule.js index 0e0ef6c68..c70766a86 100644 --- a/node_modules/tslint/lib/rules/maxClassesPerFileRule.js +++ b/node_modules/tslint/lib/rules/maxClassesPerFileRule.js @@ -35,30 +35,30 @@ var Rule = (function (_super) { var maxClasses = isNaN(argument) || argument > 0 ? argument : 1; return this.applyWithFunction(sourceFile, walk, { maxClasses: maxClasses }); }; + /* tslint:disable:object-literal-sort-keys */ + Rule.metadata = { + ruleName: "max-classes-per-file", + description: (_a = ["\n A file may not contain more than the specified number of classes"], _a.raw = ["\n A file may not contain more than the specified number of classes"], Lint.Utils.dedent(_a)), + rationale: (_b = ["\n Ensures that files have a single responsibility so that that classes each exist in their own files"], _b.raw = ["\n Ensures that files have a single responsibility so that that classes each exist in their own files"], Lint.Utils.dedent(_b)), + optionsDescription: (_c = ["\n The one required argument is an integer indicating the maximum number of classes that can appear in a file."], _c.raw = ["\n The one required argument is an integer indicating the maximum number of classes that can appear in a file."], Lint.Utils.dedent(_c)), + options: { + type: "array", + items: [ + { + type: "number", + minimum: 1, + }, + ], + additionalItems: false, + minLength: 1, + maxLength: 2, + }, + optionExamples: [[true, 1], [true, 5]], + type: "maintainability", + typescriptOnly: false, + }; return Rule; }(Lint.Rules.AbstractRule)); -/* tslint:disable:object-literal-sort-keys */ -Rule.metadata = { - ruleName: "max-classes-per-file", - description: (_a = ["\n A file may not contain more than the specified number of classes"], _a.raw = ["\n A file may not contain more than the specified number of classes"], Lint.Utils.dedent(_a)), - rationale: (_b = ["\n Ensures that files have a single responsibility so that that classes each exist in their own files"], _b.raw = ["\n Ensures that files have a single responsibility so that that classes each exist in their own files"], Lint.Utils.dedent(_b)), - optionsDescription: (_c = ["\n The one required argument is an integer indicating the maximum number of classes that can appear in a file."], _c.raw = ["\n The one required argument is an integer indicating the maximum number of classes that can appear in a file."], Lint.Utils.dedent(_c)), - options: { - type: "array", - items: [ - { - type: "number", - minimum: 1, - }, - ], - additionalItems: false, - minLength: 1, - maxLength: 2, - }, - optionExamples: [[true, 1], [true, 5]], - type: "maintainability", - typescriptOnly: false, -}; exports.Rule = Rule; function walk(ctx) { var sourceFile = ctx.sourceFile, maxClasses = ctx.options.maxClasses; |