postcss-plugins
postcss-plugins copied to clipboard
Check how plugins throw and if this matches guidelines
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.