suitcss / preprocessor

A future-facing CSS preprocessor (used by SUIT CSS)
http://suitcss.github.io
MIT License
135 stars 25 forks source link

Use one instance of postcss-reporter #27

Closed simonsmith closed 8 years ago

simonsmith commented 8 years ago

Due to there being two instance of reporter (one in the transform callback, and the other in the main list of plugins) it causes issues with throwError.

An example is if throwError is set to true (for both reporters) then if custom-media throws an error but we choose just to care about postcss-bem-linter (via plugins config in reporter) then the error gets swallowed.

An example of needing this is in utils that have media queries that are missing. We want the custom media warnings to be ignored but the bem-lint and stylelint errors to be thrown. As these are handled by two different instance of reporter it doesn't throw an error at all. It works fine with warnings though, as I guess this is just a fancy stdout.

simonsmith commented 8 years ago

Further investigation reveals it probably due to two separate postcss plugin chains as creating one reporter instance to share between them didn't make any difference. This is not a critical bug by any means, but I'll leave it open as it's a nice to fix.