Creative Juices Bo. Co.

Satisfy Your Thirst For Something Refreshing!

Oops, I broke JSLint

I think I just discovered a bug in JSLint, Cool!

You would think I would be used to breaking things by now, but I just discovered a weird bug in JSLint! How cool is that?!?

Anyway, the bug most likely isn't really a bug, it's more like a weird error result based on my screwed up JavaScript. I was working on one of my scripts and I kept getting a weird error result that looked like this:

JSLint Bug 2/9/2011

The code example above took me about 30 minutes to discover, the actual script I had was about 1000x's larger than that. I kept eliminating items until I found this little nugget (I've simplified the code for this example). The biggest headache was that JSLint wasn't properly alerting me to the line number. As you can see in the error message, it was saying line 51. Ummm, there is no line 51! Also, just so you know, it's not a bug that relates to working code, the problem ultimately boils down to a stupid mistake on my part. I was comparing the same variable twice in an IF statement.

Anyway, I just tried to join the JSLint group, so I can alert Mr. Crockford of my findings. If it doesn't kill ya, it only makes you stronger.

UPDATE 1: My request to join the JSLint group was just DENIED!! Haha, my reputation must precede me. Oh, well, I found his e-mail, perhaps he'll respond to that.

UPDATE 2: He fixed it! Awesome (Thanks Doug). If you try the code now, you will get a proper error message...

JSLint Bug 2/9/2011 FIXED!