Hacker News new | ask | show | jobs
by LazerBear 4288 days ago
Douglas Crockford, is that you? Oh the lengths people will go to avoid using 'new'...

I wonder if any linters out there warn when they see something like:

  something = SomeCapitalizedFunction()
Because forgetting to use 'new' is really the only thing I could think of that makes this pattern dangerous.
1 comments

Yes, jslint and jshint both do, by default, iirc. They'll also warn on the opposite (using 'new' with a function that doesn't start with an uppercase letter).
Ah that's fantastic, i've been using them for a while and never noticed.