clutchski/coffeelint

Unnecessary "Invoking a constructor without parens and without arguments" error

Closed this issue · 4 comments

mitar commented

With empty_constructor_needs_parens enabled, for the following line:

new OPERATIONS[operationSpec.type] operationSpec.field

I am getting this error:

Invoking a constructor without parens and without arguments.

This seems erroneous.

I thought I recognized you :)

I was thinking this was a duplicate of #308, but I see the issue here is that you are passing arguments. CoffeeLint just isn't recognizing those arguments.

mitar commented

Oh, I also had some memories I was reporting this already. :-)

I went back and read that other issue again. It is actually the same. This morning when I read it I was thinking the other issue was about camel_case_classes and maybe CoffeeLint complains about new foo() vs new Foo()

mitar commented

Oh, true.