2 * @fileoverview A rule to disallow negated left operands of the `in` operator
3 * @author Michael Ficarra
4 * @deprecated in ESLint v3.3.0
9 //------------------------------------------------------------------------------
11 //------------------------------------------------------------------------------
18 description: "disallow negating the left operand in `in` expressions",
19 category: "Possible Errors",
21 url: "https://eslint.org/docs/rules/no-negated-in-lhs"
24 replacedBy: ["no-unsafe-negation"],
30 negatedLHS: "The 'in' expression's left operand is negated."
38 BinaryExpression(node) {
39 if (node.operator === "in" && node.left.type === "UnaryExpression" && node.left.operator === "!") {
40 context.report({ node, messageId: "negatedLHS" });