I have following class:
export class MyClass {
private foos: Foo[];
constructor(foos: Foo[]) {
this.foos = foos;
}
getByA = (myA: Mya): Foo => {
return this.foos.find(foo => foo.a === myA) ?? unknownFoo();
};
}
unfortunately, in my fat arrow function, I get a warning about invalid this:
ESLint: Unexpected 'this'.(no-invalid-this)
My eslint plugin version is 4.15.1
Is there anything that I can do to make this rule work correctly apart from disabling it?