JSLint and Jasmine
Lucid is a JavaScript framework I am creating which encapsulates ideas from several large JavaScript applications. I’m sure I’ll be writing about it more as it matures, but for now I want to highlight a commit I made tonight.
I’ve been looking for a way to integrate JSLint (or JSHint, a slightly more sane version of JSLint) into the “build process” of my JavaScript-heavy apps, and it recently occurred to me that it should just be part of the test suite.
I’ve been using Jasmine a lot lately, and it was rather trivial to add a spec that runs all my src and spec files through JSHint. Now I can immediately see where I have poor syntax:

4 Comments
Hey Brandon, this is a great idea—I’m going to see if I can take a similar approach (of generating a JSLint/JSHint spec) as an optional goal for my jasmine-maven-plugin
Thanks for sharing it!
This is great thanks Brandon, exactly what I was after. Just a quick not that the link to the spec file is broken.
Malcolm: Thanks for pointing out the broken link. It’s fixed now.
Thanks! Was just watching Douglas Crockford video talking about JS Lint and had the same idea that this would be amazing to run as part of test suite.
Post a Comment