Both Underscore and jQuery implement an each
function. For consistency, you
may want to standardize on one over the other.
jquery-each: [2, "never"]
The following patterns are considered warnings:
$.each([], function(key, value){ return value % 2; });
The following patterns are not warnings:
_.each([], function(value, key){ return value % 2; });
jquery-each: [2, "always"]
The following patterns are considered warnings:
_.each([], function(value, key){ return value % 2; });
The following patterns are not warnings:
$.each([], function(key, value){ return value % 2; });
This rule has two modes: never
(the default), and always
.