Documentation

You are viewing the documentation for the 3.0.1 release. The latest stable release series is 3.0.x.

§Using JSHint

From its website documentation:

JSHint is a community-driven tool to detect errors and potential problems in JavaScript code and to enforce your team’s coding conventions. It is very flexible so you can easily adjust it to your particular coding guidelines and the environment you expect your code to execute in.

Any JavaScript file present in app/assets will be processed by JSHint and checked for errors.

§Check JavaScript sanity

JavaScript code is compiled during the assets command as well as when the browser is refreshed during development mode. Errors are shown in the browser just like any other compilation error.

§Enablement and Configuration

JSHint processing is enabled by simply adding the plugin to your plugins.sbt file when using the PlayJava or PlayScala plugins:

addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.6")

The plugin’s default configuration is normally sufficient. However please refer to the plugin’s documentation for information on how it may be configured.

Next: Using RequireJs