0.0.2 • Published 8 years ago

hound-javascript v0.0.2

Weekly downloads
5
License
MIT
Repository
github
Last release
8 years ago

hound-javascript

Utilities for creating JavaScript service for Hound

Usage

var HoundJavascript = require("hound-javascript");

// `redis` is your connection to Redis.
var houndJavascript = new HoundJavascript(redis);

// To send the result of the lint back to Hound.
// Where `job` is an object in the form of:
//
//    {
//      violations: Array,
//      filename: String,
//      commit_sha: String,
//      pull_request_number: String,
//      patch: String
//    }
//
// Where `filename`, `commit_sha`, `pull_request_number`, `patch` are all
// provided by Hound when the job is enqueued.
// `violations` is the list of violations that follows the form of:
//
//    {
//      line: Integer,
//      message: String
//    }
//

houndJavascript.completeFileReview(job);

// To report a configuration file as invalid to Hound.
// Where `job` is an object in the form of:
//
//    {
//      commit_sha: String,
//      pull_request_number: String,
//      linter_name: String
//    }
//
// Where `commit_sha`, `pull_request_number`, are provided by Hound when the job
// is enqueued. `linter_name` is the name of the current linter, i.e `eslint`.

houndJavascript.reportInvalidConfig(job);