Skip to content

remove extra commas & add quotes around "null" key to make jshint happy#88

Merged
puzrin merged 1 commit intonodeca:masterfrom
survos:jshint-cleanup
Aug 7, 2013
Merged

remove extra commas & add quotes around "null" key to make jshint happy#88
puzrin merged 1 commit intonodeca:masterfrom
survos:jshint-cleanup

Conversation

@kcivey
Copy link
Copy Markdown
Contributor

@kcivey kcivey commented Aug 7, 2013

I'm not sure if I'm missing something or if you're using a different version or configuration of jshint from mine, but make test for me gives a bunch of jshint errors about extra commas (plus one about using "null" as a key without quotes around it). This cleans those up.

puzrin pushed a commit that referenced this pull request Aug 7, 2013
remove extra commas & add quotes around "null" key to make jshint happy
@puzrin puzrin merged commit 5ff657b into nodeca:master Aug 7, 2013
@kcivey kcivey deleted the jshint-cleanup branch August 7, 2013 21:00
@puzrin
Copy link
Copy Markdown
Member

puzrin commented Aug 7, 2013

That's strange. Your commit is correct, but i don't see this bugs under ubuntu & jshint 2.1.19, when run make test

@kcivey
Copy link
Copy Markdown
Contributor Author

kcivey commented Aug 7, 2013

I saw the same errors if I just typed jshint . at the project root. But I see now that my jshint was old (0.9.1). I don't see them with 2.1.9. Weird that it would have changed to tolerate them.

@kcivey
Copy link
Copy Markdown
Contributor Author

kcivey commented Aug 7, 2013

@puzrin
Copy link
Copy Markdown
Member

puzrin commented Aug 7, 2013

No problems. Your commit is correct. I'd prefer to see such warning for es5. Because old browsers work with es5-shim, that fixes prototypes but does not fixes syntax problems.

@kcivey
Copy link
Copy Markdown
Contributor Author

kcivey commented Aug 7, 2013

Unfortunately turning on es3 in .jshintrc causes it to complain about every occurrence of assert.throws() because throws is a reserved word (but why didn't it complain about that with jshint 0.9.1 when it was complaining about quoteless "null" as a key?). Maybe there's another way to get it to check for the extra commas, but I haven't found it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants