gulp-hint-web-reporter

1.1.4 • Public • Published

gulp-hint-web-reporter

License NPM version NPM version Build Status Dependency Status

A simple reporter for gulp-htmlhint, gulp-jshint and gulp-csslint that writes it's output as a nice console summary and extended web report.

Installation

npm install gulp-hint-web-reporter --save-dev

Usage

var gulp = require('gulp');
var webReporter = require('gulp-hint-web-reporter');
 
gulp.task('lint', function() {
  return gulp.src('./**/*.js')
    .pipe(htmlhint())
    .pipe(webReporter(options));
});

Options

var options = {
    logsPath: "./logs",
    hinters: ["htmlhint"],
    filenames: {
        htmlhint: "mylog.html"
    },
    createMissingFolders: true
};

logsPath

Default: "./logs"

The folder to write output files for hint results.

hinters

Default: ["htmlhint", "jshint", "csslint"]

Additional hinters (looks in file[hinter] for hint results/messages).

filenames

Default:

{
    "htmlhint": "htmlhint-{datetime}.log.html",
    "jshint":   "jshint-{datetime}.log.html",
    "csslint":  "csslint-{datetime}.log.html"
}

Where {datetime} is replaced by new Date().toISOString()

For each hinter defines the log name. In example, by default for jshint it looks like: ./logs/jshint-2016-03-15T10:04:44.883Z.log.html

createMissingFolders

Default: true

Enables or disables creation of any folders given in the filename that do not exist. If disabled and the given path contains folders which do not exist, an ENOENT error is thrown.

showFileSummary

Default: true

Enables or disables file summary on console (just a global summary will be shown when disabled).

fail

Default: false

Forces reporter to fail if errors are found.

License

MIT © AppFeel

Release History

  • 1.1.4 Improve html reports
  • 1.1.2 Add travis.yml and readme badges
  • 1.1.0 Add fail option
  • 1.0.0 Initial release

Package Sidebar

Install

npm i gulp-hint-web-reporter

Weekly Downloads

1

Version

1.1.4

License

MIT

Last publish

Collaborators

  • appfeel