If you are using a relatively recent version of JSHint, the generally preferred approach is to create a .jshintrc file in the root of your project, and put this config in it:
{
"globals": {
"$": false
}
}
This declares to JSHint that $ is a global variable, and the false indicates that it should not be overridden.
The .jshintrc file was not supported in really old versions of JSHint (such as v0.5.5 like the original question in 2012). If you cannot or do not want to use the .jshintrc file, you can add this at the top of the script file:
/*globals $:false */
There is also a shorthand "jquery" jshint option as seen on the JSHint options page..
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…