Closed mbohgard closed 3 months ago
Thank you for reporting. ~It's a feature. Function fields are considered as methods.~ I think there is a room of discussion. Should we consider them just fields rather than method? Or should we have an option?
Ah, I had misunderstood. We shouldn't consider function fields as methods because this plugin respects default order of @typescript-eslint/member-ordering https://typescript-eslint.io/play/#ts=5.3.0-beta&fileType=.tsx&code=C4TwDgpgBAglC8UDeAoKUDGAuKBnYATgJYB2A5gNxpQCGAFAJQ77HlXoBGOjCAfHoVKUUAXxRA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6AW0XYCNFpaA9tAAmfZgHN0UPtCGRwYAL4hFQA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false
I'll fix it as a bug. (Or you can also submit a PR if you want, of course.)
It can be a significant change. So I might add an option like considerFunctionAsMethod
(default should be false).
I merged https://github.com/seiyab/prettier-plugin-sort-members/pull/41. Please await for release. I want to merge other minor fixes before the next release.
@mbohgard Shipped 0.1.2 now 🚀 . Would you try it?
@mbohgard Shipped 0.1.2 now 🚀 . Would you try it?
@seiyab Seems to work like a charm! Nice work and thank you for the quick response ❤️
Thank you!
I don't know if this is a feature or not. But when
"sortMembersAlphabetically": true
is set I guess it would always sort alphabetically?will be sorted like this after formatting:
Should be sorted like so:
Right? This behaviour collides with for ex the following eslint setup: