From 70823931ab821162edec3eda6040118695c14cd7 Mon Sep 17 00:00:00 2001 From: Michael Ratcliffe Date: Fri, 27 Nov 2015 14:12:52 -0800 Subject: [PATCH] Bug 1228363: Fixed eslint balanced-listeners rule to ignore listeners with no arguments. r=pbrosset --HG-- extra : commitid : 4h60KEIjzn0 extra : rebase_source : 8c33f3639546c701b9e2d71d74af40cc1ea4c55b --- testing/eslint-plugin-mozilla/lib/rules/balanced-listeners.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/testing/eslint-plugin-mozilla/lib/rules/balanced-listeners.js b/testing/eslint-plugin-mozilla/lib/rules/balanced-listeners.js index 80676c1729cc..c658a6b44868 100644 --- a/testing/eslint-plugin-mozilla/lib/rules/balanced-listeners.js +++ b/testing/eslint-plugin-mozilla/lib/rules/balanced-listeners.js @@ -84,6 +84,10 @@ module.exports = function(context) { return { CallExpression: function(node) { + if (node.arguments.length === 0) { + return; + } + if (node.callee.type === "MemberExpression") { var listenerMethodName = node.callee.property.name;