Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Because JavaScript isn’t compiled before being deployed, web developers don’t have the extra compilation step to identify errors. JavaScript code validators partly fill this void by performing static analysis on your JavaScript code. You were introduced to JSLint and JSHint earlier in this book. In this chapter, you’ll learn how to incorporate JSHint into your build system to automatically analyze and verify your JavaScript code.
JSHint is used in this chapter, because it comes with a prebuilt command-line file suitable for running with Rhino. JSLint, as of the time of this writing, doesn’t have a prebuilt command-line file, though some third parties have written utilities including command-line controls for JSLint.