I'm working on a plug-in for jQuery and I'm getting this JSLint error:
Problem at line 80 character 45: Do not use 'new' for side effects.
(new jQuery.fasterTrim(this, options));
I haven't had much luck finding info on this JSLint error or on any side effects that new
might have.
I've tried Googling for "Do not use 'new' for side effects." and got 0 results. Binging gives me 2 results but they both just reference the JSLint source. Hopefully this question will change that. :-)
Update #1: Here's more source for the context:
jQuery.fn.fasterTrim = function(options) {
return this.each(function() {
(new jQuery.fasterTrim(this, options));
});
};
Update #2: I used the Starter jQuery plug-in generator as a template for my plug-in, which has that code in it.