Code Monkey home page Code Monkey logo

Comments (4)

nirazul avatar nirazul commented on June 14, 2024

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.

olegskl avatar olegskl commented on June 14, 2024

@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.

brendanfalkowski avatar brendanfalkowski commented on June 14, 2024

@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:

  1. Linter starts checking CSS
  2. Errors were found
  3. Errors are logged to the console
  4. 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).

  1. Linter starts checking CSS
  2. Errors were found
  3. Errors are logged to the console
  4. Notification fires (to MacOS) of the error
  5. 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:

  1. Linter starts checking CSS
  2. All good
  3. 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.

nirazul avatar nirazul commented on June 14, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.