Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Better sparse array support? #551

Closed
cowboy opened this Issue Jun 13, 2012 · 0 comments

Comments

Projects
None yet
2 participants

cowboy commented Jun 13, 2012

Using the current www.jshint.com with the EcmaScript 5 checkbox enabled, this valid ES5 JavaScript:

var arr = ['a',, null,, '',, undefined,,];

Shows these globals:

/*jshint forin:true, noarg:true, noempty:true, eqeqeq:true, bitwise:true, strict:true, undef:true, curly:true, browser:true, es5:true, indent:4, maxerr:50 */

Yet produces these errors:

Line 1: var arr = ['a',, null,, '',, undefined,,];
Extra comma.
Line 1: var arr = ['a',, null,, '',, undefined,,];
Extra comma.
Line 1: var arr = ['a',, null,, '',, undefined,,];
Extra comma.
Line 1: var arr = ['a',, null,, '',, undefined,,];
Extra comma.

@valueof valueof closed this in bc66125 Sep 3, 2012

@jugglinmike jugglinmike added a commit to jugglinmike/jshint that referenced this issue Oct 21, 2014

@valueof @jugglinmike valueof + jugglinmike Do not warn about extra commas in ES5 sparse arrays.
Closes GH-551.
9951dcd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment