0

I want to suppress some warnings/errors in JSHint. In the document it says to pass it as an argument, but I am a bit confused.

source = "...."; // JavaScript source content
var success = JSHINT(source, options, globals);

For example, I want to suppress both "smarttabs" and "evil". How do I do that?

James Allardice
  • 164,175
  • 21
  • 332
  • 312
Gandalf
  • 920
  • 3
  • 10
  • 24

1 Answers1

0

http://www.jshint.com/docs/config/

Just supply directive comments like these, and jshint will adapt:

/* jshint undef: true, unused: true */
/* global MY_GLOBAL */

(Also, you can go through the link above to see more configuration options, such as creating a JSON literal to configure jshint's behavior).