Javascript undefined variables

I have .js files that depend on libraries–how do I make it so that JSLint/JSHint recognize that variables in my files have been defined in my libraries?  I tried adding my libraries to my project as global libraries, and then making sure they are in the scope of my .js file, but it hasn't worked.
1 comment
Comment actions Permalink
Adding JavaScript library to a project doesn't add all global variable names exported by the library to JSLint/JSHint.
So the only way is to let JSLint (JSHint) knows about all global variable names that are exported by a JavaScript library.

You can do this by filling "Predefined" field in JSLint/JSHint settings or by adding /*global */ comment in the header of a JavaScript file.

Please sign in to leave a comment.