Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tools/eslint/lib/rules/no-duplicate-case.js')
-rw-r--r--tools/eslint/lib/rules/no-duplicate-case.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/eslint/lib/rules/no-duplicate-case.js b/tools/eslint/lib/rules/no-duplicate-case.js
index 89de7174fcb..978e63cade4 100644
--- a/tools/eslint/lib/rules/no-duplicate-case.js
+++ b/tools/eslint/lib/rules/no-duplicate-case.js
@@ -25,6 +25,12 @@ module.exports = function(context) {
return node.type + typeof node.name + node.name;
} else if (node.type === "MemberExpression") {
return node.type + getHash(node.object) + getHash(node.property);
+ } else if (node.type === "CallExpression") {
+ return node.type + getHash(node.callee) + node.arguments.map(getHash).join("");
+ } else if (node.type === "BinaryExpression") {
+ return node.type + getHash(node.left) + node.operator + getHash(node.right);
+ } else if (node.type === "ConditionalExpression") {
+ return node.type + getHash(node.test) + getHash(node.consequent) + getHash(node.alternate);
}
}
@@ -57,3 +63,5 @@ module.exports = function(context) {
};
};
+
+module.exports.schema = [];