prettier-plugin-csssort
v0.0.1
Published
Prettier plug that sorts and groups CSS properties.
Downloads
2
Readme
prettier-plugin-csssort
A Prettier plugin that sorts and groups CSS properties.
Installation
Prettier plugins are automatically loaded if installed in the same node_modules
directory as Prettier itself is installed.
Read more about Prettier plugins.
FAQ
How are the properties sorted/grouped?
lib/config.js defines how properties are sorted and grouped. The configuration was inherited from CSSComb.
Can I change the way properties are sorted/grouped?
Not at this moment. Feel free to open a pull-request.
Warning
This plugin utilizes PostCSS and the postcss-sorting
plugin to do the heavy lifting. In essence, this Prettier plugin is a very thin wrapper over the afformentioned tools.
Prettier's plugin infrastructure is still in beta and under construction. Once stabilized, it might be better to implement sorting and grouping directly in this plugin. This should be more efficient since Prettier already parses the CSS into a AST using PostCSS under the hood.