Tyson Cadenhead
Tyson Cadenhead

Reputation: 352

JSLint "JavaScript URL." error

JSLint is giving me a weird error. My code looks something like this:

{ reporter: 'mocha:Spec' }

and JSLint is throwing an error that just says:

JavaScript URL.

With the line number. Has anyone seen anything like that? What does it mean? How can I avoid it?

Upvotes: 1

Views: 617

Answers (1)

a better oliver
a better oliver

Reputation: 26838

JSLint checks for javascript URLs in your code and it does so with the following line

// javascript url
jx = /(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i,

It assumes that mocha:Spec is a javascript url, like in <a href="mocha:Spec">

Upvotes: 1

Related Questions