Skip to content

Instantly share code, notes, and snippets.

@rwaldron
Created April 8, 2010 15:21
Show Gist options
  • Save rwaldron/360178 to your computer and use it in GitHub Desktop.
Save rwaldron/360178 to your computer and use it in GitHub Desktop.
Test:
var foo = { bar : 'barberic'
, baz : 'bazterd'
, duck : 'punch'
};
JSLint Results:
Error:
Problem at line 1 character 19: Bad line breaking before ','.
var foo = { bar : 'barberic'
Problem at line 2 character 19: Bad line breaking before ','.
, baz : 'bazterd'
@tamzinblake
Copy link

Man, I didn't realize JSLint was broken. Thanks for pointing that out!

@rwaldron
Copy link
Author

rwaldron commented Apr 8, 2010

Huh? JSLint is not broken - comma-first coding is broken.

@tamzinblake
Copy link

Woosh

@rwaldron
Copy link
Author

rwaldron commented Apr 8, 2010

No... I got it. I'm just trying to take a stand against this idiotic practice. (though humor is always appreciated)

@isaacs
Copy link

isaacs commented Apr 8, 2010

If jslint encourages a coding practice that makes errors harder to spot, then it IS broken.

Thom's original comment was spot on.

@antimatter15
Copy link

Well, JSLint does spot the missing comma issue, I guess it wants to keep it's job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment