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
Copy file name to clipboardExpand all lines: docs/content/rules/sort-union-types.mdx
+58Lines changed: 58 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,6 +122,64 @@ Controls whether sorting should be case-sensitive or not.
122
122
-`true` — Ignore case when sorting alphabetically or naturally (e.g., “A” and “a” are the same).
123
123
-`false` — Consider case when sorting (e.g., “A” comes before “a”).
124
124
125
+
### groups
126
+
127
+
<sub>(default: `[]`)</sub>
128
+
129
+
Allows you to specify a list of union type groups for sorting. Groups help organize types into categories, making your type definitions more readable and maintainable. Multiple groups can be combined to achieve the desired sorting order.
130
+
131
+
There are a lot of predefined groups.
132
+
133
+
Predefined Groups:
134
+
135
+
-`'conditional`' — Conditional types.
136
+
-`'function`' — Function types.
137
+
-`'import`' — Imported types.
138
+
-`'intersection`' — Intersection types.
139
+
-`'keyword`' — Keyword types.
140
+
-`'literal`' — Literal types.
141
+
-`'named`' — Named types.
142
+
-`'object`' — Object types.
143
+
-`'operator`' — Operator types.
144
+
-`'tuple`' — Tuple types.
145
+
-`'union`' — Union types.
146
+
-`'nullish`' — Nullish types (`null` or `undefined`).
147
+
-`'unknown`' — Types that don’t fit into any other group.
0 commit comments