clutchski / coffeelint

Lint your CoffeeScript.
http://www.coffeelint.org
Other
1.17k stars 172 forks source link

no_throwing_strings rule does not trigger when using round brackets #639

Open Ionaru opened 6 years ago

Ionaru commented 6 years ago

The no_throwing_strings rule does not trigger when using round brackets.

Consider the following code:

test ->
  throw 'moo'  # Lint fails (correct)
test ->
  throw('moo')  # Lint passes (incorrect)
test ->
  throw ('moo')  # Lint passes (incorrect)

This is strange because the resulting javascript is the same:

test(function() {
  throw 'moo';
});