gulp-stylelint-sourcemap

A Gulp plugin that runs stylelint results through a list of reporters.

Installation

npm install gulp-stylelint-sourcemap --save-dev

Quick start

Once you have configured stylelint (e.g. you have a .stylelintrc file), start with the following code. You will find additional configuration options below.

constgulp=require('gulp');

gulp.task('lint-css',functionlintCssTask(){

constgulpStylelint=require('gulp-stylelint-sourcemap');

return gulp

.src('src/**/*.css')

.pipe(gulpStylelint({

reporters:[

{formatter:'string', console:true}

]

}));

});

Formatters

Below is the list of currently available stylelint formatters. Some of them are bundled with stylelint by default and exposed on gulpStylelint.formatters object. Others need to be installed. You can write a custom formatter to tailor the reporting to your needs.