Open matthewmcvickar opened 4 years ago
I'm also having the same issue.
gulp.task('sass:stylelint', function () {
var src = config.sass.watchSrc;
if (config.sass.lint.extraSrc) {
src = src.concat(config.sass.lint.extraSrc);
}
return gulp.src(src)
.pipe(gulp.$.stylelint({
reporters: [
{
formatter: 'string',
console: true,
failAfterError: false,
}
]
}))
});
gulp 4.0.2 gulp-stylelint 13.0.0 stylelint-scss 3.18
Getting the same error as well. Running stylelint with the CL runs just fine. Using the default gulp-stylelint implementation from the readme. Stylelint config just the default as well.
gulp 4.0.2 gulp-stylelint 13.0.0 stylelint 13.10.0 stylelint-config-standard 20.0.0
Just noticed the same. What's up?
By setting the failAfterError option to false of gulpStylelint got it working fine. Appears that Stylelint considers any violation as an error. Which then causes the task to fail. I don't agree with that as it prevents the linting of files. My setup generates a JSON file which is then rendered as a report in the browser. Even if Stylelint wants to say that a violation is an error, gulp-stylelint should disregard that. Please let me know what I'm missing here. Is there some config option in Stylelint to prevent a file with violations to be considered "errored?"
Nothing to add other than to say I'm also running into the same issue. My setup is the same as @danparm . Setting failAfterError
to false also worked for me.
When I have a stylelint error, it is failing out of gulp, which means I have to completely restart Gulp every time I make a mistake.
(At first I thought this was a gulp-notify issue, but it persists when gulp-notify is disabled.)
My gulp task:
And the terminal output:
This should show a notification on my machine, but it doesn't; it's just failing in the terminal.
I am running the latest of all relevant packages as of this writing: