You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(eslint-plugin): [member-ordering] add natural sort order (#5662)
* [WIP] feat(eslint-plugin): [member-ordering] add natural sort order
* Fix yarn.lock and split option on case sensitivity
* Document it too
* Remove last todos
* Move member-ordering sub-tests into sub-dirs
// See below for the more specific MemberType strings
@@ -56,6 +61,17 @@ The supported member attributes are, in order:
56
61
Member attributes may be joined with a `'-'` to combine into more specific groups.
57
62
For example, `'public-field'` would come before `'private-field'`.
58
63
64
+
### Orders
65
+
66
+
The `order` value specifies what order members should be within a group.
67
+
It defaults to `as-written`, meaning any order is fine.
68
+
Other allowed values are:
69
+
70
+
-`alphabetically`: Sorted in a-z alphabetical order, directly using string `<` comparison (so `B` comes before `a`)
71
+
-`alphabetically-case-insensitive`: Sorted in a-z alphabetical order, ignoring case (so `a` comes before `B`)
72
+
-`natural`: Same as `alphabetically`, but using [`natural-compare-lite`](https://github.com/litejs/natural-compare-lite) for more friendly sorting of numbers
73
+
-`natural-case-insensitive`: Same as `alphabetically-case-insensitive`, but using [`natural-compare-lite`](https://github.com/litejs/natural-compare-lite) for more friendly sorting of numbers
Copy file name to clipboardexpand all lines: packages/eslint-plugin/tests/rules/member-ordering/member-ordering-alphabetically-case-insensitive-order.test.ts
0 commit comments