postcss-plugins icon indicating copy to clipboard operation
postcss-plugins copied to clipboard

Check how plugins throw and if this matches guidelines

Open romainmenke opened this issue 3 years ago • 0 comments

PostCSS guidelines are specific on how plugins should throw : https://github.com/postcss/postcss/blob/main/docs/guidelines/plugin.md#41-use-nodeerror-on-css-relevant-errors

I noticed in at least one plugin that there was the option to make a plugin throw instead of warn on issues.

I would personally remove this option.

Something is either a warning or a fatal error.

Because we provide fallbacks and polyfills and try to stick to CSS semantics (everything is forgiven) it is very rare that a plugin we maintain needs to throw an exception.

romainmenke avatar Jul 09 '22 09:07 romainmenke