In a previous question Run JSLint on a .js file from debugging console in chrome or firefox I learned how to run JSLint from console or from node.
Is there a way to run JSLint (from the JavaScript code like in the answer given to the above mentioned question) but with custom options, for example for code that contains jQuery (JSLint validation for Javascript with JQuery) with the options Assume a browser and the option Predefined section with jQuery and $ as parameters?
Pass an object with the options as second parameter to
JSLINT. Global variables can be defined as an array of strings and assigned to thepredefproperty of said options object.From the JSLint source code: