gulp-stylelint
A Gulp plugin that runs stylelint results through a list of provided reporters.
Installation
npm install gulp-stylelint --save-dev
Quick start
With gulp-stylelint, it's easy to generate CSS lint reports based on stylelint results.
If you already have a .stylelintrc file in your project directory:
gulp.task('lint-css', function lintCssTask() {
return gulp
.src('src/**/*.css')
.pipe(gulpStylelint({
reporters: [
gulpStylelintConsoleReporter()
]
}));
});
Options
Below is an example with all available options provided:
gulp.task('lint-css', function lintCssTask() {
return gulp
.src('src/**/*.css')
.pipe(gulpStylelint({
stylelint: {
extends: 'stylelint-config-suitcss'
},
reporters: [
gulpStylelintConsoleReporter()
],
debug: true
}));
});
stylelint
[Object]
See stylelint configuration options. When omitted, the configuration is taken from the .stylelintrc file.
reporters
[Array] default: []
List of reporters. The order of execution is sequential.
debug
[Boolean] default: false
When set to true
, the error handler will print stack trace of errors.
License
http://opensource.org/licenses/mit-license.html