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