Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 580 Bytes

no-unnecessary-fat-arrow.md

File metadata and controls

33 lines (21 loc) · 580 Bytes

coffee/no-unnecessary-fat-arrow

This rule disallows the use of "fat arrows" (=>) when they are not necessary (i.e. the function body doesn't reference this/@)

👎 Examples of incorrect code for this rule:

###eslint coffee/no-unnecessary-fat-arrow: ["error"]###

=>

(b) =>
  -> b

class A
  b: => doSomething()

👍 Examples of correct code for this rule:

###eslint coffee/no-unnecessary-fat-arrow: ["error"]###

=> @doSomething()

(@b) =>

-> this

class A
  b: =>
    @c()