I am trying to get my error count down. Lots of the things that JsLint complains about I don't find are really errors but more personal preference in my option(like braces on their own line).
It comes up with
JS Lint: '$' is not defined.
In all my files that use the short hand document rdy in jquery. I really don't think I should be defining it. Is there away to skip this check?
disable warnings eslint Use /* eslint-disable */ to ignore all warnings in a file. You may use special comments to disable some warnings. Use // eslint-disable-next-line to ignore the next line. Use /* eslint-disable */ to ignore all warnings in a file.
To ignore some folder from eslint rules we could create the file . eslintignore in root directory and add there the path to the folder we want omit (the same way as for . gitignore ). Excerpt from the ESLint documentation "In addition to any patterns in a .
On the JSLint website, there's a textbox towards the bottom right called "predefined." Add $
and the errors should go away.
Update:
With the VS2010 plugin, there's a similarly-named "Predefined Vars" textbox in the options dialog (look to the right of "Strict white space indendation":
Add
/*global $ */
at the top as per How to fix "foo is not defined" error reported by JSlint?
You can fill it up with your own declarations like
/*global language, console, whatever, cool, lib, $ */
I wish it would read
/// <reference path="Jquery/jquery-1.7.1.js" />
though, as Visualstudio itself does.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With