How to use the jshint.js.JSHINT function in jshint

To help you get started, we’ve selected a few jshint examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sconover / knit-js / test / jshint.js View on Github external
_.each(files, function(file) {
  var result = JSHINT(fs.readFileSync(file, "utf8"), {
                      
                      asi:true,               // DRY statement termination, less code spam.  
                                              // http://aresemicolonsnecessaryinjavascript.com/
                      
                      node:true,              //we like node here
                      
                      evil:true,              //dsl function uses eval
                      
                      forin:true,             //while it's possible that we could be
                                              //considering unwanted prototype methods, mostly
                                              //we're doing this because the jsobjects are being
                                              //used as maps.  
                      
                      myGlobals:{knit:false}  //no lint/hint code spam, ty very much
                      
                    })