-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sorting Should Respect Newlines #161
Labels
pending triage
Not classified yet
Comments
I would like to work on this. Will make a PR soon. |
alexanderniebuhr
pushed a commit
that referenced
this issue
Aug 11, 2021
* fix: respect separators while sorting fixes issue #161 * test(sort.test.ts): add tests for sorting * test(sort.test.ts): add tests for malformed HTML * perf(commands.ts, index.ts): improve sorting Use new strategy to sort classes and preserve formatting. * test(sort.test.ts): use new functions for testing
alexanderniebuhr
added a commit
that referenced
this issue
Aug 12, 2021
alexanderniebuhr
added a commit
that referenced
this issue
Aug 12, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would like to enable
Sort On Save
but unfortunately there is a conflict when using Prettier.Prettier wants long class attributes names' to be on separate lines but Windi will sort them back onto one line.
After saving it appears Windi's sorting is happening after Prettier leading to issues if you are also using ESLint with Prettier.
So one solution, if possible, could be to run the sorter before Prettier or other formatters.
However I think the better solution would be to respect the formatting when sorting class names.
The text was updated successfully, but these errors were encountered: