diff options
Diffstat (limited to 'node_modules/tslint/lib/rules/arrowParensRule.js')
-rw-r--r-- | node_modules/tslint/lib/rules/arrowParensRule.js | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/node_modules/tslint/lib/rules/arrowParensRule.js b/node_modules/tslint/lib/rules/arrowParensRule.js index 9884d62e3..116110560 100644 --- a/node_modules/tslint/lib/rules/arrowParensRule.js +++ b/node_modules/tslint/lib/rules/arrowParensRule.js @@ -31,26 +31,26 @@ var Rule = (function (_super) { banSingleArgParens: this.ruleArguments.indexOf(BAN_SINGLE_ARG_PARENS) !== -1, }); }; + /* tslint:disable:object-literal-sort-keys */ + Rule.metadata = { + ruleName: "arrow-parens", + description: "Requires parentheses around the parameters of arrow function definitions.", + hasFix: true, + rationale: "Maintains stylistic consistency with other arrow function definitions.", + optionsDescription: (_a = ["\n If `", "` is specified, then arrow functions with one parameter\n must not have parentheses if removing them is allowed by TypeScript."], _a.raw = ["\n If \\`", "\\` is specified, then arrow functions with one parameter\n must not have parentheses if removing them is allowed by TypeScript."], Lint.Utils.dedent(_a, BAN_SINGLE_ARG_PARENS)), + options: { + type: "string", + enum: [BAN_SINGLE_ARG_PARENS], + }, + optionExamples: [true, [true, BAN_SINGLE_ARG_PARENS]], + type: "style", + typescriptOnly: false, + }; + /* tslint:enable:object-literal-sort-keys */ + Rule.FAILURE_STRING_MISSING = "Parentheses are required around the parameters of an arrow function definition"; + Rule.FAILURE_STRING_EXISTS = "Parentheses are prohibited around the parameter in this single parameter arrow function"; return Rule; }(Lint.Rules.AbstractRule)); -/* tslint:disable:object-literal-sort-keys */ -Rule.metadata = { - ruleName: "arrow-parens", - description: "Requires parentheses around the parameters of arrow function definitions.", - hasFix: true, - rationale: "Maintains stylistic consistency with other arrow function definitions.", - optionsDescription: (_a = ["\n If `", "` is specified, then arrow functions with one parameter\n must not have parentheses if removing them is allowed by TypeScript."], _a.raw = ["\n If \\`", "\\` is specified, then arrow functions with one parameter\n must not have parentheses if removing them is allowed by TypeScript."], Lint.Utils.dedent(_a, BAN_SINGLE_ARG_PARENS)), - options: { - type: "string", - enum: [BAN_SINGLE_ARG_PARENS], - }, - optionExamples: [true, [true, BAN_SINGLE_ARG_PARENS]], - type: "style", - typescriptOnly: false, -}; -/* tslint:enable:object-literal-sort-keys */ -Rule.FAILURE_STRING_MISSING = "Parentheses are required around the parameters of an arrow function definition"; -Rule.FAILURE_STRING_EXISTS = "Parentheses are prohibited around the parameter in this single parameter arrow function"; exports.Rule = Rule; function walk(ctx) { function cb(node) { |