-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
e18e/prefer-timer-args breaks when a method inside a setInterval/setTimeout attempts to access the class instance using this..
It also collides with @typescript-eslint/unbound-method, which attempts to prevent bugs like this.
11:21 error A method that is not declared with `this: void` may cause unintentional scoping of `this` when separated from its object.
Consider using an arrow function or explicitly `.bind()`ing the method to avoid calling the method with an unintended `this` value.
If a function does not access `this`, it can be annotated with `this: void` @typescript-eslint/unbound-method
Before: Working
After: Broken

Metadata
Metadata
Assignees
Labels
No labels