aboutsummaryrefslogtreecommitdiff
path: root/node_modules/tslint/lib/rules/arrowParensRule.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-08-14 05:01:11 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-08-14 05:02:09 +0200
commit363723fc84f7b8477592e0105aeb331ec9a017af (patch)
tree29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/tslint/lib/rules/arrowParensRule.js
parent5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff)
node_modules
Diffstat (limited to 'node_modules/tslint/lib/rules/arrowParensRule.js')
-rw-r--r--node_modules/tslint/lib/rules/arrowParensRule.js36
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) {