JSLint on Rails available as gem
I released version 1.0 of JSLint on Rails yesterday. It has a few new options (see Github project page for more info), but the biggest change is that it’s now available both as a plugin and as a gem, so it can be used also with Merb and other frameworks which don’t support Rails plugins.
To use JSLint as a gem:
- install the gem (
gem install jslint_on_rails
, or via bundler) - include JSLint’s tasks in your Rakefile:
require 'jslint/tasks'
- also in the Rakefile, set path to your config file:
JSLint.config_path = "config/jslint.yml"
(put it anywhere you want) - create a sample config:
rake jslint:copy_config
After that, you can update your config and run the test as described in the previous post (rake jslint
).
- GitHub project page – http://github.com/mackuba/jslint_on_rails
- Gem page on RubyGems – http://rubygems.org/gems/jslint_on_rails