@yodasws/gulp-stylelint
v1.0.0
Published
A gulp plugin for stylelint 16
Downloads
49
Maintainers
Readme
gulp-stylelint
Use stylelint 16 in gulp 5
Installation
yarn add --dev @yodasws/gulp-stylelintUsage
import gulpStylelint from '@yodasws/gulp-stylelint';
export function lintCss() {
return gulp.src([
'src/**/*.{sass,scss,css}',
'!src/**/*.min.css',
]).pipe(gulpStylelint({
configFile: '.stylelint.config.mjs',
failAfterError: false,
fix: false,
}));
}
export function compileSass(done) {
return gulp.src([
'src/**/*.{sass,scss,css}',
'!src/**/*.min.css',
]).pipe(gulpStylelint({
configFile: '.stylelint.config.mjs',
failAfterError: true,
fix: true,
})).pipe(gulpSass(sass)({
})).dest('dist/css');
}Options
failAfterError
Type: boolean
If true, the process will exit with an error code if any linting errors are found. Default is false.
reporters
Type: Array<function | Promise<function>>
An array of reporter functions or promises that resolve to reporter functions. Each reporter function will be called with the linting results.
If no reporters are given, then we'll use styelint's string formatter.
Important stylelint Options
configFile
Type: string
The config file for stylelint. Required if stylelint throws an error that it can't find your config file.
fix
Type: boolean
Whether or not to automatically fix fixable linting errors. Default is false.
License
MIT License
© 2026 Samuel B Grundman
