aboutsummaryrefslogtreecommitdiff
path: root/node_modules/tslint/lib/rules/tripleEqualsRule.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/tripleEqualsRule.js
parent5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff)
node_modules
Diffstat (limited to 'node_modules/tslint/lib/rules/tripleEqualsRule.js')
-rw-r--r--node_modules/tslint/lib/rules/tripleEqualsRule.js50
1 files changed, 25 insertions, 25 deletions
diff --git a/node_modules/tslint/lib/rules/tripleEqualsRule.js b/node_modules/tslint/lib/rules/tripleEqualsRule.js
index c20d45f18..c93c522e2 100644
--- a/node_modules/tslint/lib/rules/tripleEqualsRule.js
+++ b/node_modules/tslint/lib/rules/tripleEqualsRule.js
@@ -33,33 +33,33 @@ var Rule = (function (_super) {
allowUndefined: this.ruleArguments.indexOf(OPTION_ALLOW_UNDEFINED_CHECK) !== -1,
});
};
+ /* tslint:disable:object-literal-sort-keys */
+ Rule.metadata = {
+ ruleName: "triple-equals",
+ description: "Requires `===` and `!==` in place of `==` and `!=`.",
+ optionsDescription: (_a = ["\n Two arguments may be optionally provided:\n\n * `\"allow-null-check\"` allows `==` and `!=` when comparing to `null`.\n * `\"allow-undefined-check\"` allows `==` and `!=` when comparing to `undefined`."], _a.raw = ["\n Two arguments may be optionally provided:\n\n * \\`\"allow-null-check\"\\` allows \\`==\\` and \\`!=\\` when comparing to \\`null\\`.\n * \\`\"allow-undefined-check\"\\` allows \\`==\\` and \\`!=\\` when comparing to \\`undefined\\`."], Lint.Utils.dedent(_a)),
+ options: {
+ type: "array",
+ items: {
+ type: "string",
+ enum: [OPTION_ALLOW_NULL_CHECK, OPTION_ALLOW_UNDEFINED_CHECK],
+ },
+ minLength: 0,
+ maxLength: 2,
+ },
+ optionExamples: [
+ true,
+ [true, "allow-null-check"],
+ [true, "allow-undefined-check"],
+ ],
+ type: "functionality",
+ typescriptOnly: false,
+ };
+ /* tslint:enable:object-literal-sort-keys */
+ Rule.EQ_FAILURE_STRING = "== should be ===";
+ Rule.NEQ_FAILURE_STRING = "!= should be !==";
return Rule;
}(Lint.Rules.AbstractRule));
-/* tslint:disable:object-literal-sort-keys */
-Rule.metadata = {
- ruleName: "triple-equals",
- description: "Requires `===` and `!==` in place of `==` and `!=`.",
- optionsDescription: (_a = ["\n Two arguments may be optionally provided:\n\n * `\"allow-null-check\"` allows `==` and `!=` when comparing to `null`.\n * `\"allow-undefined-check\"` allows `==` and `!=` when comparing to `undefined`."], _a.raw = ["\n Two arguments may be optionally provided:\n\n * \\`\"allow-null-check\"\\` allows \\`==\\` and \\`!=\\` when comparing to \\`null\\`.\n * \\`\"allow-undefined-check\"\\` allows \\`==\\` and \\`!=\\` when comparing to \\`undefined\\`."], Lint.Utils.dedent(_a)),
- options: {
- type: "array",
- items: {
- type: "string",
- enum: [OPTION_ALLOW_NULL_CHECK, OPTION_ALLOW_UNDEFINED_CHECK],
- },
- minLength: 0,
- maxLength: 2,
- },
- optionExamples: [
- true,
- [true, "allow-null-check"],
- [true, "allow-undefined-check"],
- ],
- type: "functionality",
- typescriptOnly: false,
-};
-/* tslint:enable:object-literal-sort-keys */
-Rule.EQ_FAILURE_STRING = "== should be ===";
-Rule.NEQ_FAILURE_STRING = "!= should be !==";
exports.Rule = Rule;
function walk(ctx) {
return ts.forEachChild(ctx.sourceFile, function cb(node) {