Comments (4)
I think I might run in the same issue here. I'm trying to make the reporter fail on warnings, in order to make the CI build fail. But unfortunately my custom reporter isn't able to make the pipe fail.
from gulp-stylelint.
@brendanfalkowski The plugin emits a PluginError
which causes the stream to fail with non-zero code on errors by default. You can test it on https://github.com/olegskl/gulp-stylelint-test. I don't know how splitting the linting and reporting into separate streams may resolve the issue, but I'm willing to discuss it if does not involve the condescending tone I noticed in the linked issue.
@nirazul Perhaps you can use a different configuration for your CI that elevates severity of warnings?
from gulp-stylelint.
@olegskl — I'm not sure exactly how splitting the streams helps, but I'm just passing on the feedback from @phated to find a solution and document getting a nicer local dev experience for others to reference. Consider me just a loving user of these tools, but I don't have the same depth with JS streams as the creators.
Something is handled differently because in my Gulp 3 build gulp-stylelint
would not reach the success notification if linter errors were encountered. Example events:
- Linter starts checking CSS
- Errors were found
- Errors are logged to the console
- Notification fires (to MacOS) of the error
In Gulp 4, the errors are reported but a success notifier also fires (right after the failing notifier).
- Linter starts checking CSS
- Errors were found
- Errors are logged to the console
- Notification fires (to MacOS) of the error
- Notification fires (to MacOS) of the success
I'm guessing this happens because the "lintCss" task is finishing, and that's what it's supposed to do when the linter runs and passes:
- Linter starts checking CSS
- All good
- Notification fires (to MacOS) of the success
This could very well be my Gulpfile's patterns or my error formatter. Both of them changed between Gulp 3 and 4, but my new build is using fewer packages and more native Gulp/Node functions.
I was hoping it was a simple config change, but the options I tried didn't help:
gravitydepartment/frontend-starter#4 (comment)
from gulp-stylelint.
@olegskl I would prefer to keep one single configuration as I do with gulp-eslint
. I think the only thing that needs to change is to take into consideration the --max-warnings
flag of stylelint
.
from gulp-stylelint.
Related Issues (20)
- Takes a long time to load HOT 1
- How to use gulp-stylelint with caching?
- Fix flag overwrites scss file content HOT 3
- Seperate report per input file
- Why is `stylelint` not a dependency? HOT 1
- autofix isn't working HOT 1
- Option { fix: true; } fails if src glob has an exclusion HOT 2
- warning " > [email protected]" has incorrect peer dependency "stylelint@^9.6.0". HOT 1
- `fix: true` + .stylelintignore results in ignored files content replaced with `[]` HOT 5
- Print absolute paths with the string formatter
- Update to stylelint 12.0 HOT 2
- Remove mkdirp?
- gulp-stylelint failing out of gulp process on error HOT 5
- Upgrade to newer version of stylelint HOT 15
- Update to stylelint 14 HOT 1
- Error "ruleMetadata" when using "verbose" or "github" formatter (reporters) HOT 1
- Stylehint .pipe to gulp.dest causing unHandeled 'error' event HOT 1
- `node_modules` not ignored HOT 2
- Can't get autofix to work HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-stylelint.