Created
February 9, 2012 01:25
-
-
Save dstrelau/1776245 to your computer and use it in GitHub Desktop.
JSLint via ExecJS in Rails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group :development do | |
gem 'execjslint', require: false | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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