ni / javascript-styleguide

JavaScript and TypeScript Style Guide
MIT License
9 stars 9 forks source link

Add docs for unbound-method #61

Closed jattasNI closed 3 years ago

jattasNI commented 3 years ago

Rationale

Fixing violations of the @typescript-eslint/unbound-method rule requires you to understand how this behaves in various situations, which is something I always have to re-teach myself. Rather than sending developers out to the web to learn how to fix violations, we should provide some guidance in our rule documentation.

Implementation

Synthesized information from this comment thread when we initially discussed the rule and this stackblitz where I re-learned this behaviors into a comment which describes some common resolutions.