diff options
Diffstat (limited to 'node_modules/tslint/lib/rules/noTrailingWhitespaceRule.js')
-rw-r--r-- | node_modules/tslint/lib/rules/noTrailingWhitespaceRule.js | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/node_modules/tslint/lib/rules/noTrailingWhitespaceRule.js b/node_modules/tslint/lib/rules/noTrailingWhitespaceRule.js index 56615b1b5..b29aec663 100644 --- a/node_modules/tslint/lib/rules/noTrailingWhitespaceRule.js +++ b/node_modules/tslint/lib/rules/noTrailingWhitespaceRule.js @@ -37,32 +37,32 @@ var Rule = (function (_super) { ignoreTemplates: this.ruleArguments.indexOf(OPTION_IGNORE_TEMPLATE_STRINGS) !== -1, }); }; + /* tslint:disable:object-literal-sort-keys */ + Rule.metadata = { + ruleName: "no-trailing-whitespace", + description: "Disallows trailing whitespace at the end of a line.", + rationale: "Keeps version control diffs clean as it prevents accidental whitespace from being committed.", + optionsDescription: (_a = ["\n Possible settings are:\n\n * `\"", "\"`: Allows trailing whitespace in template strings.\n * `\"", "\"`: Allows trailing whitespace in comments.\n * `\"", "\"`: Allows trailing whitespace only in JSDoc comments."], _a.raw = ["\n Possible settings are:\n\n * \\`\"", "\"\\`: Allows trailing whitespace in template strings.\n * \\`\"", "\"\\`: Allows trailing whitespace in comments.\n * \\`\"", "\"\\`: Allows trailing whitespace only in JSDoc comments."], Lint.Utils.dedent(_a, OPTION_IGNORE_TEMPLATE_STRINGS, OPTION_IGNORE_COMMENTS, OPTION_IGNORE_JSDOC)), + hasFix: true, + options: { + type: "array", + items: { + type: "string", + enum: [OPTION_IGNORE_COMMENTS, OPTION_IGNORE_JSDOC, OPTION_IGNORE_TEMPLATE_STRINGS], + }, + }, + optionExamples: [ + true, + [true, OPTION_IGNORE_COMMENTS], + [true, OPTION_IGNORE_JSDOC], + ], + type: "style", + typescriptOnly: false, + }; + /* tslint:enable:object-literal-sort-keys */ + Rule.FAILURE_STRING = "trailing whitespace"; return Rule; }(Lint.Rules.AbstractRule)); -/* tslint:disable:object-literal-sort-keys */ -Rule.metadata = { - ruleName: "no-trailing-whitespace", - description: "Disallows trailing whitespace at the end of a line.", - rationale: "Keeps version control diffs clean as it prevents accidental whitespace from being committed.", - optionsDescription: (_a = ["\n Possible settings are:\n\n * `\"", "\"`: Allows trailing whitespace in template strings.\n * `\"", "\"`: Allows trailing whitespace in comments.\n * `\"", "\"`: Allows trailing whitespace only in JSDoc comments."], _a.raw = ["\n Possible settings are:\n\n * \\`\"", "\"\\`: Allows trailing whitespace in template strings.\n * \\`\"", "\"\\`: Allows trailing whitespace in comments.\n * \\`\"", "\"\\`: Allows trailing whitespace only in JSDoc comments."], Lint.Utils.dedent(_a, OPTION_IGNORE_TEMPLATE_STRINGS, OPTION_IGNORE_COMMENTS, OPTION_IGNORE_JSDOC)), - hasFix: true, - options: { - type: "array", - items: { - type: "string", - enum: [OPTION_IGNORE_COMMENTS, OPTION_IGNORE_JSDOC, OPTION_IGNORE_TEMPLATE_STRINGS], - }, - }, - optionExamples: [ - true, - [true, OPTION_IGNORE_COMMENTS], - [true, OPTION_IGNORE_JSDOC], - ], - type: "style", - typescriptOnly: false, -}; -/* tslint:enable:object-literal-sort-keys */ -Rule.FAILURE_STRING = "trailing whitespace"; exports.Rule = Rule; function walk(ctx) { var possibleFailures = []; |