diff options
Diffstat (limited to 'node_modules/tslint/lib/rules/noConsecutiveBlankLinesRule.js')
-rw-r--r-- | node_modules/tslint/lib/rules/noConsecutiveBlankLinesRule.js | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/node_modules/tslint/lib/rules/noConsecutiveBlankLinesRule.js b/node_modules/tslint/lib/rules/noConsecutiveBlankLinesRule.js index b97668024..544e5b309 100644 --- a/node_modules/tslint/lib/rules/noConsecutiveBlankLinesRule.js +++ b/node_modules/tslint/lib/rules/noConsecutiveBlankLinesRule.js @@ -42,24 +42,24 @@ var Rule = (function (_super) { var limit = this.ruleArguments[0]; return this.applyWithFunction(sourceFile, walk, limit !== undefined ? limit : Rule.DEFAULT_ALLOWED_BLANKS); }; + Rule.DEFAULT_ALLOWED_BLANKS = 1; + /* tslint:disable:object-literal-sort-keys */ + Rule.metadata = { + ruleName: "no-consecutive-blank-lines", + description: "Disallows one or more blank lines in a row.", + hasFix: true, + rationale: "Helps maintain a readable style in your codebase.", + optionsDescription: (_a = ["\n An optional number of maximum allowed sequential blanks can be specified. If no value\n is provided, a default of ", " will be used."], _a.raw = ["\n An optional number of maximum allowed sequential blanks can be specified. If no value\n is provided, a default of ", " will be used."], Lint.Utils.dedent(_a, Rule.DEFAULT_ALLOWED_BLANKS)), + options: { + type: "number", + minimum: "1", + }, + optionExamples: [true, [true, 2]], + type: "style", + typescriptOnly: false, + }; return Rule; }(Lint.Rules.AbstractRule)); -Rule.DEFAULT_ALLOWED_BLANKS = 1; -/* tslint:disable:object-literal-sort-keys */ -Rule.metadata = { - ruleName: "no-consecutive-blank-lines", - description: "Disallows one or more blank lines in a row.", - hasFix: true, - rationale: "Helps maintain a readable style in your codebase.", - optionsDescription: (_a = ["\n An optional number of maximum allowed sequential blanks can be specified. If no value\n is provided, a default of $(Rule.DEFAULT_ALLOWED_BLANKS) will be used."], _a.raw = ["\n An optional number of maximum allowed sequential blanks can be specified. If no value\n is provided, a default of $(Rule.DEFAULT_ALLOWED_BLANKS) will be used."], Lint.Utils.dedent(_a)), - options: { - type: "number", - minimum: "$(Rule.MINIMUM_ALLOWED_BLANKS)", - }, - optionExamples: [true, [true, 2]], - type: "style", - typescriptOnly: false, -}; exports.Rule = Rule; function walk(ctx) { var sourceText = ctx.sourceFile.text; |