Fix custom formatters access to needless disables results #4136
Labels
status: wip
is being worked on by someone
type: enhancement
a new feature that isn't related to rules
I'm using a custom formatter to output logs so that our CI system can automatically create check annotations on GitHub. This works great for linting errors, but because the needless disables results are generated after the formatter is called, there's no way to access it without calling the underlying
needlessDisables()
function in the custom formatter.(Side note: when I
require('stylelint/lib/needlessDisables')
and call it on the results in my custom formatter, things get really weird: the first (and/or last??) rule listed in mystylelint-disable
comment is always reported as unused, but when I delete it the rule is applied and throws an error. 🙃)10.1.0
CLI with
stylelint --custom-formatter path/to/my/formatter.js
I expected the formatting function to get
needlessDisables
in one or more of its result objects, or as a second argument.The text was updated successfully, but these errors were encountered: