JSLint and Screw.Unit

written by trotter on March 29th, 2009 @ 11:32 AM

I’ve been working on a new JavaScript library lately and I like using JSLint to ensure my code is good. Unfortunately, JSLint will go nuts when you run it over a Screw.Unit test file. Thankfully, the fix is as simple as adding an extern declaration at the top. The extern tells JSLint that the following variable names are defined outside the current file. For Screw.Unit, the following extern declaration worked:

/*extern Screw, describe, it, expect, equal, before */

Comments are closed

Options:

Size

Colors