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-intersection-types.mdx
+56Lines changed: 56 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,6 +102,62 @@ Controls whether sorting should be case-sensitive or not.
102
102
-`true` — Ignore case when sorting alphabetically or naturally (e.g., “A” and “a” are the same).
103
103
-`false` — Consider case when sorting (e.g., “A” comes before “a”).
104
104
105
+
### groups
106
+
107
+
<sub>(default: `[]`)</sub>
108
+
109
+
Allows you to specify a list of intersection 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.
110
+
111
+
There are a lot of predefined groups.
112
+
113
+
Predefined Groups:
114
+
115
+
-`'conditional`' — Conditional types.
116
+
-`'function`' — Function types.
117
+
-`'import`' — Imported types.
118
+
-`'intersection`' — Intersection types.
119
+
-`'keyword`' — Keyword types.
120
+
-`'literal`' — Literal types.
121
+
-`'named`' — Named types.
122
+
-`'object`' — Object types.
123
+
-`'operator`' — Operator types.
124
+
-`'tuple`' — Tuple types.
125
+
-`'union`' — Union types.
126
+
-`'nullish`' — Nullish types (`null` or `undefined`).
127
+
-`'unknown`' — Types that don’t fit into any other group.
0 commit comments