Skip to content

Commit f92ab2a

Browse files
authored
feat: allow unsorted type for all remaining rules
1 parent 46d0174 commit f92ab2a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+2108
-188
lines changed

docs/content/rules/sort-array-includes.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Specifies the sorting method.
129129
- `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
130130
- `'line-length'` — Sort items by the length of the code line (shorter lines first).
131131
- `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
132-
- `'unsorted'` — Do not sort items. To be used with the [`useConfigurationIf`](#useconfigurationif) option.
132+
- `'unsorted'` — Do not sort items. [`grouping`](#groups) and [`newlines behavior`](#newlinesbetween) are still enforced.
133133

134134
### order
135135

@@ -429,6 +429,7 @@ Custom groups have a higher priority than any predefined group.
429429
{
430430
type: 'alphabetical',
431431
order: 'asc',
432+
fallbackSort: { type: 'unsorted' },
432433
ignoreCase: true,
433434
specialCharacters: 'keep',
434435
groupKind: 'literals-first',
@@ -459,6 +460,7 @@ Custom groups have a higher priority than any predefined group.
459460
{
460461
type: 'alphabetical',
461462
order: 'asc',
463+
fallbackSort: { type: 'unsorted' },
462464
ignoreCase: true,
463465
specialCharacters: 'keep',
464466
groupKind: 'literals-first',

docs/content/rules/sort-classes.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ Specifies the sorting method.
164164
- `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
165165
- `'line-length'` — Sort items by the length of the code line (shorter lines first).
166166
- `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
167+
- `'unsorted'` — Do not sort items. [`grouping`](#groups) and [`newlines behavior`](#newlinesbetween) are still enforced.
167168

168169
### order
169170

@@ -767,6 +768,7 @@ Example:
767768
{
768769
type: 'alphabetical',
769770
order: 'asc',
771+
fallbackSort: { type: 'unsorted' },
770772
ignoreCase: true,
771773
specialCharacters: 'keep',
772774
partitionByComment: false,
@@ -820,6 +822,7 @@ Example:
820822
{
821823
type: 'alphabetical',
822824
order: 'asc',
825+
fallbackSort: { type: 'unsorted' },
823826
ignoreCase: true,
824827
specialCharacters: 'keep',
825828
partitionByComment: false,

docs/content/rules/sort-decorators.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ Specifies the sorting method.
128128
- `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
129129
- `'line-length'` — Sort items by the length of the code line (shorter lines first).
130130
- `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
131+
- `'unsorted'` — Do not sort items. [`grouping`](#groups) is still enforced.
131132

132133
### order
133134

@@ -325,6 +326,7 @@ class MyClass {
325326
{
326327
type: 'alphabetical',
327328
order: 'asc',
329+
fallbackSort: { type: 'unsorted' },
328330
ignoreCase: true,
329331
specialCharacters: 'keep',
330332
groups: [],
@@ -356,6 +358,7 @@ class MyClass {
356358
{
357359
type: 'alphabetical',
358360
order: 'asc',
361+
fallbackSort: { type: 'unsorted' },
359362
ignoreCase: true,
360363
specialCharacters: 'keep',
361364
groups: [],

docs/content/rules/sort-enums.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ Specifies the sorting method.
9494
- `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
9595
- `'line-length'` — Sort items by the length of the code line (shorter lines first).
9696
- `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
97+
- `'unsorted'` — Do not sort items. [`grouping`](#groups) and [`newlines behavior`](#newlinesbetween) are still enforced.
9798

9899
### order
99100

@@ -340,6 +341,7 @@ Custom groups have a higher priority than any predefined group.
340341
{
341342
type: 'alphabetical',
342343
order: 'asc',
344+
fallbackSort: { type: 'unsorted' },
343345
ignoreCase: true,
344346
specialCharacters: 'keep',
345347
partitionByComment: false,
@@ -371,6 +373,7 @@ Custom groups have a higher priority than any predefined group.
371373
{
372374
type: 'alphabetical',
373375
order: 'asc',
376+
fallbackSort: { type: 'unsorted' },
374377
ignoreCase: true,
375378
specialCharacters: 'keep',
376379
partitionByComment: false,

docs/content/rules/sort-exports.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ Specifies the sorting method.
8888
- `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
8989
- `'line-length'` — Sort items by the length of the code line (shorter lines first).
9090
- `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
91+
- `'unsorted'` — Do not sort items.
9192

9293
### order
9394

@@ -216,6 +217,7 @@ Allows you to group exports by their kind, determining whether value exports sho
216217
{
217218
type: 'alphabetical',
218219
order: 'asc',
220+
fallbackSort: { type: 'unsorted' },
219221
ignoreCase: true,
220222
specialCharacters: 'keep',
221223
partitionByComment: false,
@@ -243,6 +245,7 @@ Allows you to group exports by their kind, determining whether value exports sho
243245
{
244246
type: 'alphabetical',
245247
order: 'asc',
248+
fallbackSort: { type: 'unsorted' },
246249
ignoreCase: true,
247250
specialCharacters: 'keep',
248251
partitionByComment: false,

docs/content/rules/sort-heritage-clauses.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Specifies the sorting method.
7171
- `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
7272
- `'line-length'` — Sort items by the length of the code line (shorter lines first).
7373
- `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
74+
- `'unsorted'` — Do not sort items. [`grouping`](#groups) is still enforced.
7475

7576
### order
7677

@@ -221,6 +222,7 @@ interface Interface extends WithId, Logged, StartupService {
221222
{
222223
type: 'alphabetical',
223224
order: 'asc',
225+
fallbackSort: { type: 'unsorted' },
224226
ignoreCase: true,
225227
specialCharacters: 'keep',
226228
groups: [],
@@ -247,6 +249,7 @@ interface Interface extends WithId, Logged, StartupService {
247249
{
248250
type: 'alphabetical',
249251
order: 'asc',
252+
fallbackSort: { type: 'unsorted' },
250253
ignoreCase: true,
251254
specialCharacters: 'keep',
252255
groups: [],

docs/content/rules/sort-imports.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ Specifies the sorting method.
127127
- `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
128128
- `'line-length'` — Sort items by the length of the code line (shorter lines first).
129129
- `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
130+
- `'unsorted'` — Do not sort items. [`grouping`](#groups) and [`newlines behavior`](#newlinesbetween) are still enforced.
130131

131132
### order
132133

@@ -450,6 +451,7 @@ Specifies which environment’s built-in modules should be recognized. If you ar
450451
{
451452
type: 'alphabetical',
452453
order: 'asc',
454+
fallbackSort: { type: 'unsorted' },
453455
ignoreCase: true,
454456
specialCharacters: 'keep',
455457
internalPattern: ['^~/.+'],
@@ -491,6 +493,7 @@ Specifies which environment’s built-in modules should be recognized. If you ar
491493
{
492494
type: 'alphabetical',
493495
order: 'asc',
496+
fallbackSort: { type: 'unsorted' },
494497
ignoreCase: true,
495498
specialCharacters: 'keep',
496499
internalPattern: ['^~/.+'],

docs/content/rules/sort-interfaces.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Specifies the sorting method.
143143
- `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
144144
- `'line-length'` — Sort items by the length of the code line (shorter lines first).
145145
- `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
146-
- `'unsorted'` — Do not sort items. To be used with the [`useConfigurationIf`](#useconfigurationif) option.
146+
- `'unsorted'` — Do not sort items. [`grouping`](#groups) and [`newlines behavior`](#newlinesbetween) are still enforced.
147147

148148
### order
149149

@@ -631,6 +631,7 @@ interface User {
631631
{
632632
type: 'alphabetical',
633633
order: 'asc',
634+
fallbackSort: { type: 'unsorted' },
634635
ignoreCase: true,
635636
specialCharacters: 'keep',
636637
ignorePattern: [],
@@ -663,6 +664,7 @@ interface User {
663664
{
664665
type: 'alphabetical',
665666
order: 'asc',
667+
fallbackSort: { type: 'unsorted' },
666668
ignoreCase: true,
667669
specialCharacters: 'keep',
668670
ignorePattern: [],

docs/content/rules/sort-intersection-types.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ Specifies the sorting method.
8484
- `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
8585
- `'line-length'` — Sort items by the length of the code line (shorter lines first).
8686
- `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
87+
- `'unsorted'` — Do not sort items. [`grouping`](#groups) and [`newlines behavior`](#newlinesbetween) are still enforced.
8788

8889
### order
8990

@@ -358,6 +359,7 @@ This feature is only applicable when `partitionByNewLine` is false.
358359
{
359360
type: 'alphabetical',
360361
order: 'asc',
362+
fallbackSort: { type: 'unsorted' },
361363
ignoreCase: true,
362364
specialCharacters: 'keep',
363365
partitionByComment: false,
@@ -386,6 +388,7 @@ This feature is only applicable when `partitionByNewLine` is false.
386388
{
387389
type: 'alphabetical',
388390
order: 'asc',
391+
fallbackSort: { type: 'unsorted' },
389392
ignoreCase: true,
390393
specialCharacters: 'keep',
391394
partitionByComment: false,

docs/content/rules/sort-jsx-props.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ Specifies the sorting method.
144144
- `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
145145
- `'line-length'` — Sort items by the length of the code line (shorter lines first).
146146
- `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
147-
- `'unsorted'` — Do not sort items. To be used with the [`useConfigurationIf`](#useconfigurationif) option.
147+
- `'unsorted'` — Do not sort items. [`grouping`](#groups) and [`newlines behavior`](#newlinesbetween) are still enforced.
148148

149149
### order
150150

@@ -394,6 +394,7 @@ Custom group matching takes precedence over predefined group matching.
394394
{
395395
type: 'alphabetical',
396396
order: 'asc',
397+
fallbackSort: { type: 'unsorted' },
397398
ignoreCase: true,
398399
specialCharacters: 'keep',
399400
ignorePattern: [],
@@ -424,6 +425,7 @@ Custom group matching takes precedence over predefined group matching.
424425
{
425426
type: 'alphabetical',
426427
order: 'asc',
428+
fallbackSort: { type: 'unsorted' },
427429
ignoreCase: true,
428430
specialCharacters: 'keep',
429431
ignorePattern: [],

0 commit comments

Comments
 (0)