How to show all the errors and get a JSHint report in JavaScript?
I have the following code that validates JavaScript code:
var jsCode = "....."; // JavaScript code here
var success = JSHint(jsCode); //
alert(success); // Shows whether 'true' or 'false'
How can I show the list of all errors in the code instead of just 'true'
or 'false'? In the documentation, it says, "In that case, you can use
JSHINT.errors to retrieve the errors or request a complete report by
calling the JSHINT.data() method."
No comments:
Post a Comment