JSLint - '$' was used before it was defined

Friday, September 14, 2012
I'm using JSLint to validate my JavaScript.  For no other reason, it keeps things consistent.  However, I get the below warning message when performing a $(document).ready(...) call:

'$' was used before it was defined

To get around this, I pass jQuery in, assign it to $, and set my JSLint options.  Below is an example usage:

<script type="text/javascript">
    /// <reference path="../../Scripts/jquery-1.7.2.js" />
    /*jslint browser: true*/

    (function ($) {
        "use strict";
        /*global jQuery, document*/
        $(document).ready(function () {