The esquery we were using was too wide in that it would match a .left at any level.
This meant the following code would match:
render() {
x = this.foo || 123;
}
As a LogicalExpression has a left just like an AssignmentExpression.
Since esquery doesn't support relative direct child selection (i.e. using :has(> foo)), we are now selecting the left side node and reporting on the parent instead.
The esquery we were using was too wide in that it would match a
.left
at any level.This meant the following code would match:
As a
LogicalExpression
has a left just like anAssignmentExpression
.Since esquery doesn't support relative direct child selection (i.e. using
:has(> foo)
), we are now selecting the left side node and reporting on the parent instead.