Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
module.exports = function(context) {
'use strict';
return {
BinaryExpression: function(node) {
if (node.operator === 'instanceof' && node.left.type === 'UnaryExpression' && node.left.operator === '!') {
context.report(node, "Check dangerous instanceof use (! has higher precedence than instanceof)");
}
}
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.