It totaly makes sense to me to use it here. What would be the alternative? How can i generaly avoid to use them and most of all why is it bad according to jsLint to make us
jsLint is very stringent. It's probably not necessary to get too hung up about it.
But if you feel bad, you can do it just like how you scoped jQuery:
(function($){
$(function(){
$.each(somearray ,(function($body){ $body.dosomething() })($('body'));
if (something){
$('body').somethingelse();
}
});
}(jQuery));