Closed aseemk closed 7 years ago
I don't think the code is any deeper than, 'is there a fat arrow in front of a function in a class?'. There's not much deep static analysis determining whether something later on gets called internally/privately.
It does seems like fat arrows in local/private functions should be valid as it returns the class/object rather than this
, so maybe the rule should have been sussed out better.
That said, I suppose you should just turn this off in your case, or directly call it as URL::
. If I'm interpreting this issue wrong feel free to point that out. Otherwise I'm not sure what else can be done to fix this.
Moved from https://github.com/clutchski/coffeelint/pull/444#issuecomment-202578186:
I use a little helper for convenient getter/setter syntax, and it seems a fat arrow is needed.
http://coffeescript.org/#try:class%20Test%0A%20%20%20%20get1%20%3D%20(props)%20%3D%3E%0A%20%20%20%20%20%20%20%20%20console.log%20%40%0A%20%20%20%20get2%20%3D%20(props)%20-%3E%0A%20%20%20%20%20%20%20%20console.log%20%40%0A%0A%20%20%20%20get1%20foo%3A%20-%3E%20bar%0A%20%20%20%20get2%20foo%3A%20-%3E%20baz
cc @mitar