gulp-coffeelint-threshold
A GulpJS plugin to catch the output from gulp-coffeelint and call a callback if the error or warning count is above a threshold you set
Last updated 6 years ago by adam-lynch .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gulp-coffeelint-threshold 
SYNC missed versions from official npm registry.

gulp-coffeelint-threshold

A GulpJS plugin to catch the output from gulp-coffeelint and call a callback if the error or warning count is above a threshold you set.

Information

Package gulp-coffeelint-threshold
Description A GulpJS plugin to catch the output from gulp-coffeelint and call a callback if the error or warning count is above a threshold you set.
Node Version >= 0.8

Installation

npm install gulp-coffeelint-threshold

Usage

var gulp = require('gulp');
var gutil = require('gulp-util');
var coffeelint = require('gulp-coffeelint');
var coffeelintThreshold = require('gulp-coffeelint-threshold');

gulp.task('lint', function() {
    gulp.src('./*.coffee')
        .pipe(coffeelint())
        .pipe(coffeelintThreshold(10, 0, function(numberOfWarnings, numberOfErrors){
            gutil.beep();
            throw new Error('CoffeeLint failure; see above. Warning count: ' + numberOfWarnings
                + '. Error count: ' + numberOfErrors + '.');
        }));
});

gulp.task('default', ['lint']);

Arguments

coffeelintThreshold(maxWarnings, maxErrors, callbackOnFailure)

  • maxWarnings, a number. Set to -1 if you don't want any warning threshold.
  • errorWarnings, a number. Set to -1 if you don't want any warning threshold.
  • callbackOnFailure(numberOfWarnings, numberOfWarnings), a function that gets called when the number of warnings or errors are over their respective thresholds you have set. It gets passed the number of warnings and errors as arguments.

Current Tags

  • 1.0.0                                ...           latest (6 years ago)

2 Versions

  • 1.0.0                                ...           6 years ago
  • 0.0.1                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (3)
Dependents (2)

Copyright 2014 - 2017 © taobao.org |