Install and configure the JSHint on Rails gem.
Install the gem:
$ gem install guard-jshint-on-rails
Add it to your Gemfile (inside development group):
Add guard definition to your Guardfile by running this command:
$ guard init jshint-on-rails
:config_path is available to specify the path to the yaml file.
Please read Guard doc for more information about the Guardfile DSL.