Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-lesshint

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-lesshint

Lint your .less files from Gulp with lesshint.

  • 6.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
659
decreased by-52.56%
Maintainers
1
Weekly downloads
 
Created
Source

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
        .pipe(lesshint.failOnWarning()); // Use this to fail the task on lint warnings
});

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.
  • lesshint.failOnWarning()
    • Use this to fail the task when there are at least one lint result with a severity of warning.NOTE: this does not respect the maxWarnings option.

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

Keywords

FAQs

Package last updated on 31 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc