aboutsummaryrefslogtreecommitdiff
path: root/node_modules/tslint/lib/rules/preferFunctionOverMethodRule.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/tslint/lib/rules/preferFunctionOverMethodRule.js')
-rw-r--r--node_modules/tslint/lib/rules/preferFunctionOverMethodRule.js36
1 files changed, 18 insertions, 18 deletions
diff --git a/node_modules/tslint/lib/rules/preferFunctionOverMethodRule.js b/node_modules/tslint/lib/rules/preferFunctionOverMethodRule.js
index d703adda3..83daf2363 100644
--- a/node_modules/tslint/lib/rules/preferFunctionOverMethodRule.js
+++ b/node_modules/tslint/lib/rules/preferFunctionOverMethodRule.js
@@ -33,26 +33,26 @@ var Rule = (function (_super) {
allowPublic: this.ruleArguments.indexOf(OPTION_ALLOW_PUBLIC) !== -1,
}));
};
+ /* tslint:disable:object-literal-sort-keys */
+ Rule.metadata = {
+ ruleName: "prefer-function-over-method",
+ description: "Warns for class methods that do not use 'this'.",
+ optionsDescription: (_a = ["\n \"", "\" excludes checking of public methods.\n \"", "\" excludes checking of protected methods."], _a.raw = ["\n \"", "\" excludes checking of public methods.\n \"", "\" excludes checking of protected methods."], Lint.Utils.dedent(_a, OPTION_ALLOW_PUBLIC, OPTION_ALLOW_PROTECTED)),
+ options: {
+ type: "string",
+ enum: [OPTION_ALLOW_PUBLIC, OPTION_ALLOW_PROTECTED],
+ },
+ optionExamples: [
+ true,
+ [true, OPTION_ALLOW_PUBLIC, OPTION_ALLOW_PROTECTED],
+ ],
+ type: "style",
+ typescriptOnly: false,
+ };
+ /* tslint:enable:object-literal-sort-keys */
+ Rule.FAILURE_STRING = "Class method does not use 'this'. Use a function instead.";
return Rule;
}(Lint.Rules.AbstractRule));
-/* tslint:disable:object-literal-sort-keys */
-Rule.metadata = {
- ruleName: "prefer-function-over-method",
- description: "Warns for class methods that do not use 'this'.",
- optionsDescription: (_a = ["\n \"", "\" excludes checking of public methods.\n \"", "\" excludes checking of protected methods."], _a.raw = ["\n \"", "\" excludes checking of public methods.\n \"", "\" excludes checking of protected methods."], Lint.Utils.dedent(_a, OPTION_ALLOW_PUBLIC, OPTION_ALLOW_PROTECTED)),
- options: {
- type: "string",
- enum: [OPTION_ALLOW_PUBLIC, OPTION_ALLOW_PROTECTED],
- },
- optionExamples: [
- true,
- [true, OPTION_ALLOW_PUBLIC, OPTION_ALLOW_PROTECTED],
- ],
- type: "style",
- typescriptOnly: false,
-};
-/* tslint:enable:object-literal-sort-keys */
-Rule.FAILURE_STRING = "Class method does not use 'this'. Use a function instead.";
exports.Rule = Rule;
var PreferFunctionOverMethodWalker = (function (_super) {
tslib_1.__extends(PreferFunctionOverMethodWalker, _super);