whoward/jslint-v8 — pull request #3 by CloCkWeRX (2012-08-16 00:25:18+00:00)
Title: Add a checkstyle formatter

Example usage in a rake task:

JSLintV8::RakeTask.new do |task|
task.name = "lint:checkstyle"
task.description = "runs jslint against all important javascript files outputting in checkstyle"

task.output_stream = File.open('checkstyle-errors.xml', "w+")

task.include_pattern = "app/assets/javascripts/**/*.js"
task.exclude_pattern = "app/assets/javascripts/{generated,lib}/**/*.js"

task.formatter = 'checkstyle'

# pass boolean options to jshint like this, these are merged with the default options
task.jquery = true # predefine jQuery globals
task.browser = true # predefine Browser globals
task.bitwise = false # allow bitwise operators to be used

# or just access the options hash directly, be sure to use strings for keys
task.lint_options["strict"] = true
end

or

jslint-v8 --checkstyle > foo.xml

My apologies for lack of test coverage at the moment, I do need to add some and ensure the error type being returned is appropriate - net.csslint.Catfish for example doesn't sound right.

However, this should produce a checkstyle format xml document.