If setting a config option the installed Stylelint version doesn't support, then the whole formatter stops and throws an error.
Recommendations:
Maybe wrap your config set methods in try-catches to handle these errors gracefully (with maybe a console.warn about the rule)?
This kind of error is hard for you to fix because you can't control what rules people will put into their configs and what version of stylelint npm will install exactly. It was exasperated by vscode because it installs the minimum possible version of a dependency linsted in a plugin (e.g. @^7.5.0 installs 7.5.0 even if 7.8.0 is available).
Originally a bug over on vscode-stylefmt
If setting a config option the installed Stylelint version doesn't support, then the whole formatter stops and throws an error.
Recommendations:
Maybe wrap your config set methods in
try-catch
es to handle these errors gracefully (with maybe aconsole.warn
about the rule)?This kind of error is hard for you to fix because you can't control what rules people will put into their configs and what version of stylelint npm will install exactly. It was exasperated by vscode because it installs the minimum possible version of a dependency linsted in a plugin (e.g.
@^7.5.0
installs7.5.0
even if7.8.0
is available).