Closed bert-mccutchen closed 9 months ago
🏷️ [bumpr] Next version:v1.21.0 Changes:v1.20.2...reviewdog:stylelint-format-message-text
As a side note from all of this, we should add a more complete test suite that we can run via actions:
stylelint-config-recommended
.
Another thing we should do is create a separation between Stylelint 15 for CommonJS and Stylelint 16+ for ESM. This way we don't have to worry when they drop Stylelint 17 without CommonJS.
🚀 [bumpr] Bumped! New version:v1.21.0 Changes:v1.20.2...v1.21.0
Fixes https://github.com/reviewdog/action-stylelint/issues/112 ... again
Why?
Turns out that Stylelint doesn't pre-escape strings before they are passed to formatters, which I suppose makes sense. This was causing lots of invalid characters (like newlines) to make its way into the resulting JSON, which was breaking Reviewdog.
I am astounded at how
JSON.stringify
doesn't automatically escape invalid characters, and that it would rather produce an invalid JSON result.Also, i'm not sure how this composite action was working before, since it was using the default JSON formatter - which doesn't do anything we needed to do here today. Maybe jq could parse the invalid JSON and then produce a valid result?
What
Added formatMessageText from the Stylelint stringFormatter source.