reid / node-jslint

The JavaScript Code Quality Tool — for Node.js.
http://jslint.com/
Other
491 stars 101 forks source link

Spurious "'$' was used before it was defined." #117

Closed mcandre closed 9 years ago

mcandre commented 9 years ago

In my front-end JavaScript code, I often use $( ...) to perform jQuery selections. JSLint mistakenly thinks that $ is undefined, when in reality, it is defined by another JavaScript file loaded before mine.

I have { "browser": true } in my ~/.jslintrc.

mcandre commented 9 years ago

Ah, { "predef": [ "$" ] } fixes this.