Closed cyfung1031 closed 9 months ago
Yes, these are known issues with stylelint and beautifier, I can only hope they will be resolved upstream someday.
See also #880.
I can only hope they will be resolved upstream someday.
Any Github Repo for the upstream?
Disregard that. The first problem is #880. The beautifier upstream repo is semi-abandoned so it doesn't matter and I don't know any modern CSS beautifiers that can be compiled as a small bundle.
Disregard that. The first problem is #880. The beautifier upstream repo is semi-abandoned so it doesn't matter and I don't know any modern CSS beautifiers that can be compiled as a small bundle.
https://github.com/openstyles/stylus/blob/master/vendor-overwrites/beautify/ https://github.com/openstyles/stylus/blob/master/vendor-overwrites/beautify/beautify-css-mod.js
You means this right? Would you mind PRs for this file?
Sure.
I think though it should be rewritten entirely, either using parserlib
or postcss
from our stylelint-bundle (it's not exposed currently, but we can expose it).
Example Styles:
1. Incorrect Hints
It always show a red cross in the editor. But actually there is no problem in the code as it is
@preprocessor stylus
2. It cannot beautify. The code will be broken.
Before
After
"beautify" will break the stylus features. At this moment, I need to add a empty comment
//
at the end of each line to prevent the breaking.