-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(no-this-assign-in-render): explicit left hand side traversal (#185)
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: ```ts 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.
- Loading branch information
Showing
2 changed files
with
13 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters