Skip to content

Instantly share code, notes, and snippets.

@dstrelau
Created February 9, 2012 01:25
Show Gist options
  • Save dstrelau/1776245 to your computer and use it in GitHub Desktop.
Save dstrelau/1776245 to your computer and use it in GitHub Desktop.
JSLint via ExecJS in Rails
group :development do
gem 'execjslint', require: false
end
begin
require 'jslint/testtask'
JSLint::TestTask.new do |t|
t.file_list = Dir['{app,lib}/assets/javascripts/**/*.js']
t.options = {
browser: true,
nomen: true,
sloppy: true,
white: true
}
end
Rake::Task[:test].enhance(['jslint'])
rescue LoadError
# JSLint not loaded (eg, in production). Oh well.
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment