opensoul.org

JSLint and Jasmine

February 20, 2011 code 1 min read

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:

Screenshot of jshint output

This content is open source. Suggest Improvements.

@bkeepers

avatar of Brandon Keepers I am Brandon Keepers, and I work at GitHub on making Open Source more approachable, effective, and ubiquitous. I tend to think like an engineer, work like an artist, dream like an astronaut, love like a human, and sleep like a baby.