Fix use of unicode symbols in formatters for native Windows cmd
What steps are needed to reproduce the bug?
- Run stylelint on Windows 10 native cmd (haven't tried 11)
What Stylelint configuration is needed to reproduce the bug?
Doesn't matter as long as you get an error or one of the symbols here:
https://github.com/stylelint/stylelint/blob/e3615618321833fe4b0b57c065416da977c87def/lib/formatters/stringFormatter.mjs#L34-L39
How did you run Stylelint?
stylelint "**/*.{css,scss}" --cache --cache-location .cache/.stylelintcache --rd
Which version of Stylelint are you using?
14.1.0
What did you expect to happen?
The characters should show properly
What actually happened?

Does the bug relate to non-standard syntax?
No response
Proposal to fix the bug
No response
@XhmikosR Thank you for creating this issue. This limitation has been introduced by the log-symbols package refactoring (PR #5562).
A solution is adding the fallback symbols like log-symbols does:
https://github.com/sindresorhus/log-symbols/blob/6aea9853e1fb85a437f868d0ef400ce122c08c1d/index.js#L11-L16
but the is-unicode-supported logic also seems necessary for adding the fallback. (is-unicode-supported is pure ESM... 😓 )
Do you have any thoughts?
Not sure TBH. I'd use an existent package, personally, even if it's an older version.
That being said, it seems someone wrongfully ignored the failures on Windows 😛: https://github.com/stylelint/stylelint/blob/main/lib/formatters/tests/prepareFormatterOutput.js
These failures there were valid and it's the same reason for this issue.
I'm not sure about Windows, but how many people use Stylint on the native cmd (not supporting Unicode)? Is it worth adding dependencies or logic?
Also, it seems good to fix lib/formatters/__tests__/prepareFormatterOutput.js if we could avoid CI failures for Windows.
There would be no failures if the issue I reported didn't exist.
When something is broken, we shouldn't work around it in tests, but try to fix it instead.
This issue is older than one month. Please ask before opening a pull request, as it may no longer be relevant.