Ninja Party Manager

    xl-gulp-lesshint

    4.1.3 • Public • Published

    gulp-lesshint

    Build Status

    Installation

    npm install gulp-lesshint --save-dev

    Usage

    const gulp = require('gulp');
    const lesshint = require('gulp-lesshint');
     
    gulp.task('lint', () => {
        return gulp.src('./src/*.less')
            .pipe(lesshint({
                // Options
            }))
            .pipe(lesshint.reporter('reporter-name')) // Leave empty to use the default, "stylish"
            .pipe(lesshint.failOnError()); // Use this to fail the task on lint errors
    });

    Options

    • configPath
      • Pass a path to a valid configuration file and stop lesshint from looking for a .lesshintrc file.
    • maxWarnings
      • The maximum number of warnings to allow, before failing the task. Omit this option to always allow the task to pass.

    API

    • lesshint.failOnError()
      • Use this to fail the task when there are at least one lint result with a severity of error.

    Reporters

    If no reporter name is passed, the default lesshint-reporter-stylish will be used which just prints everything with different colors. If you wish to specify your own, please refer to the lesshint reporter loading steps for the exact logic.

    Result

    The following properties will be added to the file object.

    file.lesshint.success = true; // or false
    file.lesshint.resultCount = 0; // number of results returned by lesshint
    file.lesshint.results = []; // lesshint results

    Install

    npm i xl-gulp-lesshint

    DownloadsWeekly Downloads

    83

    Version

    4.1.3

    License

    MIT

    Unpacked Size

    9.1 kB

    Total Files

    5

    Last publish

    Collaborators

    • bogdannechyporenko