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.faste
It's complaining because you're calling "new" but then throwing away the returned object, I bet. Why is that code using "new"? In other words, why isn't it just
jQuery.fasterTrim(this, options);
edit OK, well that "Starter" tool generates the code that way because it really does want a new object created, and yes it really is to take advantage of side effects. The constructor code that "Starter" generates stashes a reference to the new object on the affected element, using the jQuery "data" facility.