Sha256: 09ffe860d7733739427ad0005f115ab1d75fbd1daf15db6f90f83e3dcc6a20a3
Contents?: true
Size: 672 Bytes
Versions: 2
Compression:
Stored size: 672 Bytes
Contents
/** * @fileoverview A rule to disallow negated left operands of the `in` operator * @author Michael Ficarra */ "use strict"; //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ module.exports = function(context) { return { "BinaryExpression": function(node) { if (node.operator === "in" && node.left.type === "UnaryExpression" && node.left.operator === "!") { context.report(node, "The `in` expression's left operand is negated"); } } }; }; module.exports.schema = [];
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
eslint_node_modules-1.6.0.1 | vendor/node_modules/eslint/lib/rules/no-negated-in-lhs.js |
eslint_node_modules-1.6.0 | vendor/node_modules/eslint/lib/rules/no-negated-in-lhs.js |