Skip to content

Files

Latest commit

 

History

History
13 lines (7 loc) · 704 Bytes

missing_fat_arrows.md

File metadata and controls

13 lines (7 loc) · 704 Bytes

Pattern: Missing fat arrow

Issue: -

Description

Warns when you use this inside a function that wasn't defined with a fat arrow. This rule does not apply to methods defined in a class, since they have this bound to the class instance (or the class itself, for class methods).

The option is_strict is available for checking bindings of class methods. It is impossible to statically determine whether a function using this will be bound with the correct this value due to language features like Function.prototype.call and Function.prototype.bind, so this rule may produce false positives.

Further Reading