Fix Grunt lint tests for eventsForResource's function inside loop