You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
171: warning: test for equality (==) mistyped as assignment (=)?
if (result = iterator.call(context, value, index, list)) _.breakLoop();
.............................................................^
341: WARNING: block statements containing block statements should use curly braces to resolve ambiguity
for (var i = 0, l = array.length; i < l; i++) if (array[i] === item) return i;
..................................................^
350: WARNING: block statements containing block statements should use curly braces to resolve ambiguity
while (i--) if (array[i] === item) return i;
................^
448: WARNING: block statements containing block statements should use curly braces to resolve ambiguity
for (var key in obj) if (hasOwnProperty.call(obj, key)) keys[keys.length] = key;
.........................^
516: WARNING: block statements containing block statements should use curly braces to resolve ambiguity
for (var key in a) if (!(key in b) || !_.isEqual(a[key], b[key])) return false;
.......................^
523: WARNING: block statements containing block statements should use curly braces to resolve ambiguity
for (var key in obj) if (hasOwnProperty.call(obj, key)) return false;
.........................^
The text was updated successfully, but these errors were encountered:
I'm afraid that Underscore isn't intended to pass JSLint. We use a configured version of JavaScriptLint to lint it, with sane warnings. JSLint encourages a pedantic, heavy style -- and Underscore is written to be read. Sorry about that.
Validate Javascript
underscore.js
0 error(s), 9 warning(s)
171: warning: test for equality (==) mistyped as assignment (=)?
if (result = iterator.call(context, value, index, list)) _.breakLoop();
.............................................................^
341: WARNING: block statements containing block statements should use curly braces to resolve ambiguity
for (var i = 0, l = array.length; i < l; i++) if (array[i] === item) return i;
..................................................^
350: WARNING: block statements containing block statements should use curly braces to resolve ambiguity
while (i--) if (array[i] === item) return i;
................^
360: warning: variable start hides argument
start = solo ? 0 : args[0],
........^
361: warning: variable stop hides argument
stop = solo ? args[0] : args[1],
........^
362: warning: variable step hides argument
step = args[2] || 1,
........^
448: WARNING: block statements containing block statements should use curly braces to resolve ambiguity
for (var key in obj) if (hasOwnProperty.call(obj, key)) keys[keys.length] = key;
.........................^
516: WARNING: block statements containing block statements should use curly braces to resolve ambiguity
for (var key in a) if (!(key in b) || !_.isEqual(a[key], b[key])) return false;
.......................^
523: WARNING: block statements containing block statements should use curly braces to resolve ambiguity
for (var key in obj) if (hasOwnProperty.call(obj, key)) return false;
.........................^
The text was updated successfully, but these errors were encountered: