Repository: azat-io/eslint-plugin-perfectionist
Pull request #468 (2025-02-11 23:35:43)

feat: allow `type: unsorted` for all remaining rules
Most of the added lines are documentation and tests.

# Description

Today, only the following rules support `type: unsorted` directly in the `options` object (meaning: outside of `customGroups`)
- `sort-array-includes`
- `sort-sets`
- `sort-maps` (is supposed to but actually isn't due to its JSON schema, and a test is missing about that)
- `sort-objects`
- `sort-interfaces`
- `sort-object-types`

These rules support this feature because they have a `useConfigurationIf` option, which synergizes well together. 

# The problem

The current implementation of `type: unsorted` is simple, but is lacking as it returns very early. As such,
 - It ignores `newlinesBetween`.
 - It ignores `groups`. 
 - It ignores dependency order (although this is less of an issue as we don't enforce a specific sort order here).
 
 Users may want to `type: unsorted` with:
- `newlinesBetween`, in order not to enforce sorting order, but to enforce no newline between elements.
- `groups`, to enforce grouping, but not enforce any sorting other than required dependency sort.

Making all rules handle `type: unsorted` also makes the codebase more uniform: it's better if all rules can handle as many things in common as possible!

# Proposal

This PR focuses on the following:

1. Prevents `type: unsorted` from returning early and ignoring `newlinesBetween` and `groups` options.
2. Enables `type: unsorted` for all remaining rules that did not support it.

The two implementation commits are:
- [`58b912a` (#468)](https://github.com/azat-io/eslint-plugin-perfectionist/pull/468/commits/58b912a3e4afbaf9d319422d2eac59bf58af70b2)
- [`1062616` (#468)](https://github.com/azat-io/eslint-plugin-perfectionist/pull/468/commits/1062616e90ffdab5b02725c6ef1b6f5a16335c30#diff-d1149eacc16e5d16a1e342785697e006129812e2ef84f719f917744d067581db)

## Commit split

- Commit **1**: Documentation fixes from previous PRs.
- Commit **2**: Fixes `sort-maps` not handling `type: unsorted` when it should already be.
- Commits **3-5**: Refactor and adds additional tests to rules already handling `type: unsorted`. 
- Commit **6**: Enables `type: unsorted` for all remaining rules.
- Commits **7+**: 1 commit per rule
  - Simplifying code if needed.
  - Updating documentation.
  - Adding tests.

## Impacted tests

No test was removed or had its content updated.

## What is the purpose of this pull request?

- [x] New Feature



Patch:
diff --git a/docs/content/rules/sort-array-includes.mdx b/docs/content/rules/sort-array-includes.mdx
index ab8b498..8c33840 100644
--- a/docs/content/rules/sort-array-includes.mdx
+++ b/docs/content/rules/sort-array-includes.mdx
@@ -129,7 +129,7 @@ Specifies the sorting method.
 - `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
 - `'line-length'` — Sort items by the length of the code line (shorter lines first).
 - `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
-- `'unsorted'` — Do not sort items. To be used with the [`useConfigurationIf`](#useconfigurationif) option.
+- `'unsorted'` — Do not sort items. [`grouping`](#groups) and [`newlines behavior`](#newlinesbetween) are still enforced.
 
 ### order
 
@@ -429,6 +429,7 @@ Custom groups have a higher priority than any predefined group.
                 {
                   type: 'alphabetical',
                   order: 'asc',
+                  fallbackSort: { type: 'unsorted' },
                   ignoreCase: true,
                   specialCharacters: 'keep',
                   groupKind: 'literals-first',
@@ -459,6 +460,7 @@ Custom groups have a higher priority than any predefined group.
               {
                 type: 'alphabetical',
                 order: 'asc',
+                fallbackSort: { type: 'unsorted' },
                 ignoreCase: true,
                 specialCharacters: 'keep',
                 groupKind: 'literals-first',
diff --git a/docs/content/rules/sort-classes.mdx b/docs/content/rules/sort-classes.mdx
index 1d2ab94..6721685 100644
--- a/docs/content/rules/sort-classes.mdx
+++ b/docs/content/rules/sort-classes.mdx
@@ -164,6 +164,7 @@ Specifies the sorting method.
 - `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
 - `'line-length'` — Sort items by the length of the code line (shorter lines first).
 - `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
+- `'unsorted'` — Do not sort items. [`grouping`](#groups) and [`newlines behavior`](#newlinesbetween) are still enforced.
 
 ### order
 
@@ -767,6 +768,7 @@ Example:
                 {
                   type: 'alphabetical',
                   order: 'asc',
+                  fallbackSort: { type: 'unsorted' },
                   ignoreCase: true,
                   specialCharacters: 'keep',
                   partitionByComment: false,
@@ -820,6 +822,7 @@ Example:
               {
                 type: 'alphabetical',
                 order: 'asc',
+                fallbackSort: { type: 'unsorted' },
                 ignoreCase: true,
                 specialCharacters: 'keep',
                 partitionByComment: false,
diff --git a/docs/content/rules/sort-decorators.mdx b/docs/content/rules/sort-decorators.mdx
index 3073976..91be888 100644
--- a/docs/content/rules/sort-decorators.mdx
+++ b/docs/content/rules/sort-decorators.mdx
@@ -128,6 +128,7 @@ Specifies the sorting method.
 - `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
 - `'line-length'` — Sort items by the length of the code line (shorter lines first).
 - `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
+- `'unsorted'` — Do not sort items. [`grouping`](#groups) is still enforced.
 
 ### order
 
@@ -325,6 +326,7 @@ class MyClass {
                 {
                   type: 'alphabetical',
                   order: 'asc',
+                  fallbackSort: { type: 'unsorted' },
                   ignoreCase: true,
                   specialCharacters: 'keep',
                   groups: [],
@@ -356,6 +358,7 @@ class MyClass {
               {
                 type: 'alphabetical',
                 order: 'asc',
+                fallbackSort: { type: 'unsorted' },
                 ignoreCase: true,
                 specialCharacters: 'keep',
                 groups: [],
diff --git a/docs/content/rules/sort-enums.mdx b/docs/content/rules/sort-enums.mdx
index 301de9c..27b6ea4 100644
--- a/docs/content/rules/sort-enums.mdx
+++ b/docs/content/rules/sort-enums.mdx
@@ -94,6 +94,7 @@ Specifies the sorting method.
 - `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
 - `'line-length'` — Sort items by the length of the code line (shorter lines first).
 - `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
+- `'unsorted'` — Do not sort items. [`grouping`](#groups) and [`newlines behavior`](#newlinesbetween) are still enforced.
 
 ### order
 
@@ -340,6 +341,7 @@ Custom groups have a higher priority than any predefined group.
                 {
                   type: 'alphabetical',
                   order: 'asc',
+                  fallbackSort: { type: 'unsorted' },
                   ignoreCase: true,
                   specialCharacters: 'keep',
                   partitionByComment: false,
@@ -371,6 +373,7 @@ Custom groups have a higher priority than any predefined group.
               {
                 type: 'alphabetical',
                 order: 'asc',
+                fallbackSort: { type: 'unsorted' },
                 ignoreCase: true,
                 specialCharacters: 'keep',
                 partitionByComment: false,
diff --git a/docs/content/rules/sort-exports.mdx b/docs/content/rules/sort-exports.mdx
index 245d8fa..d027cfe 100644
--- a/docs/content/rules/sort-exports.mdx
+++ b/docs/content/rules/sort-exports.mdx
@@ -88,6 +88,7 @@ Specifies the sorting method.
 - `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
 - `'line-length'` — Sort items by the length of the code line (shorter lines first).
 - `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
+- `'unsorted'` — Do not sort items.
 
 ### order
 
@@ -216,6 +217,7 @@ Allows you to group exports by their kind, determining whether value exports sho
                 {
                   type: 'alphabetical',
                   order: 'asc',
+                  fallbackSort: { type: 'unsorted' },
                   ignoreCase: true,
                   specialCharacters: 'keep',
                   partitionByComment: false,
@@ -243,6 +245,7 @@ Allows you to group exports by their kind, determining whether value exports sho
               {
                 type: 'alphabetical',
                 order: 'asc',
+                fallbackSort: { type: 'unsorted' },
                 ignoreCase: true,
                 specialCharacters: 'keep',
                 partitionByComment: false,
diff --git a/docs/content/rules/sort-heritage-clauses.mdx b/docs/content/rules/sort-heritage-clauses.mdx
index aab973b..2f7278c 100644
--- a/docs/content/rules/sort-heritage-clauses.mdx
+++ b/docs/content/rules/sort-heritage-clauses.mdx
@@ -71,6 +71,7 @@ Specifies the sorting method.
 - `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
 - `'line-length'` — Sort items by the length of the code line (shorter lines first).
 - `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
+- `'unsorted'` — Do not sort items. [`grouping`](#groups) is still enforced.
 
 ### order
 
@@ -221,6 +222,7 @@ interface Interface extends WithId, Logged, StartupService {
                 {
                   type: 'alphabetical',
                   order: 'asc',
+                  fallbackSort: { type: 'unsorted' },
                   ignoreCase: true,
                   specialCharacters: 'keep',
                   groups: [],
@@ -247,6 +249,7 @@ interface Interface extends WithId, Logged, StartupService {
               {
                 type: 'alphabetical',
                 order: 'asc',
+                fallbackSort: { type: 'unsorted' },
                 ignoreCase: true,
                 specialCharacters: 'keep',
                 groups: [],
diff --git a/docs/content/rules/sort-imports.mdx b/docs/content/rules/sort-imports.mdx
index 9f51350..d552600 100644
--- a/docs/content/rules/sort-imports.mdx
+++ b/docs/content/rules/sort-imports.mdx
@@ -127,6 +127,7 @@ Specifies the sorting method.
 - `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
 - `'line-length'` — Sort items by the length of the code line (shorter lines first).
 - `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
+- `'unsorted'` — Do not sort items. [`grouping`](#groups) and [`newlines behavior`](#newlinesbetween) are still enforced.
 
 ### order
 
@@ -450,6 +451,7 @@ Specifies which environment’s built-in modules should be recognized. If you ar
                 {
                   type: 'alphabetical',
                   order: 'asc',
+                  fallbackSort: { type: 'unsorted' },
                   ignoreCase: true,
                   specialCharacters: 'keep',
                   internalPattern: ['^~/.+'],
@@ -491,6 +493,7 @@ Specifies which environment’s built-in modules should be recognized. If you ar
               {
                 type: 'alphabetical',
                 order: 'asc',
+                fallbackSort: { type: 'unsorted' },
                 ignoreCase: true,
                 specialCharacters: 'keep',
                 internalPattern: ['^~/.+'],
diff --git a/docs/content/rules/sort-interfaces.mdx b/docs/content/rules/sort-interfaces.mdx
index d6fd3b6..2a758f6 100644
--- a/docs/content/rules/sort-interfaces.mdx
+++ b/docs/content/rules/sort-interfaces.mdx
@@ -143,7 +143,7 @@ Specifies the sorting method.
 - `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
 - `'line-length'` — Sort items by the length of the code line (shorter lines first).
 - `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
-- `'unsorted'` — Do not sort items. To be used with the [`useConfigurationIf`](#useconfigurationif) option.
+- `'unsorted'` — Do not sort items. [`grouping`](#groups) and [`newlines behavior`](#newlinesbetween) are still enforced.
 
 ### order
 
@@ -631,6 +631,7 @@ interface User {
                 {
                   type: 'alphabetical',
                   order: 'asc',
+                  fallbackSort: { type: 'unsorted' },
                   ignoreCase: true,
                   specialCharacters: 'keep',
                   ignorePattern: [],
@@ -663,6 +664,7 @@ interface User {
               {
                 type: 'alphabetical',
                 order: 'asc',
+                fallbackSort: { type: 'unsorted' },
                 ignoreCase: true,
                 specialCharacters: 'keep',
                 ignorePattern: [],
diff --git a/docs/content/rules/sort-intersection-types.mdx b/docs/content/rules/sort-intersection-types.mdx
index f047a4f..0c3b21b 100644
--- a/docs/content/rules/sort-intersection-types.mdx
+++ b/docs/content/rules/sort-intersection-types.mdx
@@ -84,6 +84,7 @@ Specifies the sorting method.
 - `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
 - `'line-length'` — Sort items by the length of the code line (shorter lines first).
 - `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
+- `'unsorted'` — Do not sort items. [`grouping`](#groups) and [`newlines behavior`](#newlinesbetween) are still enforced.
 
 ### order
 
@@ -358,6 +359,7 @@ This feature is only applicable when `partitionByNewLine` is false.
                 {
                   type: 'alphabetical',
                   order: 'asc',
+                  fallbackSort: { type: 'unsorted' },
                   ignoreCase: true,
                   specialCharacters: 'keep',
                   partitionByComment: false,
@@ -386,6 +388,7 @@ This feature is only applicable when `partitionByNewLine` is false.
               {
                 type: 'alphabetical',
                 order: 'asc',
+                fallbackSort: { type: 'unsorted' },
                 ignoreCase: true,
                 specialCharacters: 'keep',
                 partitionByComment: false,
diff --git a/docs/content/rules/sort-jsx-props.mdx b/docs/content/rules/sort-jsx-props.mdx
index 29f5700..5764835 100644
--- a/docs/content/rules/sort-jsx-props.mdx
+++ b/docs/content/rules/sort-jsx-props.mdx
@@ -144,7 +144,7 @@ Specifies the sorting method.
 - `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
 - `'line-length'` — Sort items by the length of the code line (shorter lines first).
 - `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
-- `'unsorted'` — Do not sort items. To be used with the [`useConfigurationIf`](#useconfigurationif) option.
+- `'unsorted'` — Do not sort items. [`grouping`](#groups) and [`newlines behavior`](#newlinesbetween) are still enforced.
 
 ### order
 
@@ -394,6 +394,7 @@ Custom group matching takes precedence over predefined group matching.
                 {
                   type: 'alphabetical',
                   order: 'asc',
+                  fallbackSort: { type: 'unsorted' },
                   ignoreCase: true,
                   specialCharacters: 'keep',
                   ignorePattern: [],
@@ -424,6 +425,7 @@ Custom group matching takes precedence over predefined group matching.
               {
                 type: 'alphabetical',
                 order: 'asc',
+                fallbackSort: { type: 'unsorted' },
                 ignoreCase: true,
                 specialCharacters: 'keep',
                 ignorePattern: [],
diff --git a/docs/content/rules/sort-maps.mdx b/docs/content/rules/sort-maps.mdx
index 32c1c1d..bd20657 100644
--- a/docs/content/rules/sort-maps.mdx
+++ b/docs/content/rules/sort-maps.mdx
@@ -89,7 +89,7 @@ Specifies the sorting method.
 - `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
 - `'line-length'` — Sort items by the length of the code line (shorter lines first).
 - `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
-- `'unsorted'` — Do not sort items. To be used with the [`useConfigurationIf`](#useconfigurationif) option.
+- `'unsorted'` — Do not sort items. [`grouping`](#groups) and [`newlines behavior`](#newlinesbetween) are still enforced.
 
 ### order
 
@@ -370,6 +370,7 @@ Custom groups have a higher priority than any predefined group.
                 {
                   type: 'alphabetical',
                   order: 'asc',
+                  fallbackSort: { type: 'unsorted' },
                   ignoreCase: true,
                   specialCharacters: 'keep',
                   partitionByNewLine: false,
@@ -400,6 +401,7 @@ Custom groups have a higher priority than any predefined group.
               {
                 type: 'alphabetical',
                 order: 'asc',
+                fallbackSort: { type: 'unsorted' },
                 ignoreCase: true,
                 specialCharacters: 'keep',
                 partitionByNewLine: false,
diff --git a/docs/content/rules/sort-modules.mdx b/docs/content/rules/sort-modules.mdx
index 4532246..e3b1004 100644
--- a/docs/content/rules/sort-modules.mdx
+++ b/docs/content/rules/sort-modules.mdx
@@ -187,6 +187,7 @@ Specifies the sorting method.
 - `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
 - `'line-length'` — Sort items by the length of the code line (shorter lines first).
 - `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
+- `'unsorted'` — Do not sort items. [`grouping`](#groups) and [`newlines behavior`](#newlinesbetween) are still enforced.
 
 ### order
 
@@ -559,6 +560,7 @@ This feature is only applicable when `partitionByNewLine` is false.
                 {
                   type: 'alphabetical',
                   order: 'asc',
+                  fallbackSort: { type: 'unsorted' },
                   ignoreCase: true,
                   specialCharacters: 'keep',
                   partitionByComment: false,
@@ -601,6 +603,7 @@ This feature is only applicable when `partitionByNewLine` is false.
               {
                 type: 'alphabetical',
                 order: 'asc',
+                fallbackSort: { type: 'unsorted' },
                 ignoreCase: true,
                 specialCharacters: 'keep',
                 partitionByComment: false,
diff --git a/docs/content/rules/sort-named-exports.mdx b/docs/content/rules/sort-named-exports.mdx
index 2ddec31..8edb805 100644
--- a/docs/content/rules/sort-named-exports.mdx
+++ b/docs/content/rules/sort-named-exports.mdx
@@ -107,6 +107,7 @@ Specifies the sorting method.
 - `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
 - `'line-length'` — Sort items by the length of the code line (shorter lines first).
 - `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
+- `'unsorted'` — Do not sort items.
 
 ### order
 
@@ -253,6 +254,7 @@ Each group of members (separated by empty lines) is treated independently, and t
                 {
                   type: 'alphabetical',
                   order: 'asc',
+                  fallbackSort: { type: 'unsorted' },
                   ignoreAlias: false,
                   ignoreCase: true,
                   specialCharacters: 'keep',
@@ -281,6 +283,7 @@ Each group of members (separated by empty lines) is treated independently, and t
               {
                 type: 'alphabetical',
                 order: 'asc',
+                fallbackSort: { type: 'unsorted' },
                 ignoreAlias: false,
                 ignoreCase: true,
                 specialCharacters: 'keep',
diff --git a/docs/content/rules/sort-named-imports.mdx b/docs/content/rules/sort-named-imports.mdx
index f9f391e..1bc2231 100644
--- a/docs/content/rules/sort-named-imports.mdx
+++ b/docs/content/rules/sort-named-imports.mdx
@@ -108,6 +108,7 @@ Specifies the sorting method.
 - `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
 - `'line-length'` — Sort items by the length of the code line (shorter lines first).
 - `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
+- `'unsorted'` — Do not sort items.
 
 ### order
 
@@ -253,6 +254,7 @@ import {
                 {
                   type: 'alphabetical',
                   order: 'asc',
+                  fallbackSort: { type: 'unsorted' },
                   ignoreAlias: false,
                   ignoreCase: true,
                   specialCharacters: 'keep',
@@ -281,6 +283,7 @@ import {
               {
                 type: 'alphabetical',
                 order: 'asc',
+                fallbackSort: { type: 'unsorted' },
                 ignoreAlias: false,
                 ignoreCase: true,
                 specialCharacters: 'keep',
diff --git a/docs/content/rules/sort-object-types.mdx b/docs/content/rules/sort-object-types.mdx
index 02f7a12..3baf46a 100644
--- a/docs/content/rules/sort-object-types.mdx
+++ b/docs/content/rules/sort-object-types.mdx
@@ -105,7 +105,7 @@ Specifies the sorting method.
 - `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
 - `'line-length'` — Sort items by the length of the code line (shorter lines first).
 - `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
-- `'unsorted'` — Do not sort items. To be used with the [`useConfigurationIf`](#useconfigurationif) option.
+- `'unsorted'` — Do not sort items. [`grouping`](#groups) and [`newlines behavior`](#newlinesbetween) are still enforced.
 
 ### order
 
@@ -597,6 +597,7 @@ This feature is only applicable when `partitionByNewLine` is false.
                 {
                   type: 'alphabetical',
                   order: 'asc',
+                  fallbackSort: { type: 'unsorted' },
                   ignoreCase: true,
                   specialCharacters: 'keep',
                   ignorePattern: [],
@@ -628,6 +629,7 @@ This feature is only applicable when `partitionByNewLine` is false.
               {
                 type: 'alphabetical',
                 order: 'asc',
+                fallbackSort: { type: 'unsorted' },
                 ignoreCase: true,
                 specialCharacters: 'keep',
                 ignorePattern: [],
diff --git a/docs/content/rules/sort-objects.mdx b/docs/content/rules/sort-objects.mdx
index 175b620..b1e8d8d 100644
--- a/docs/content/rules/sort-objects.mdx
+++ b/docs/content/rules/sort-objects.mdx
@@ -163,7 +163,7 @@ Specifies the sorting method.
 - `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
 - `'line-length'` — Sort items by the length of the code line (shorter lines first).
 - `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
-- `'unsorted'` — Do not sort items. To be used with the [`useConfigurationIf`](#useconfigurationif) option.
+- `'unsorted'` — Do not sort items. [`grouping`](#groups) and [`newlines behavior`](#newlinesbetween) are still enforced.
 
 ### order
 
@@ -658,6 +658,7 @@ let user = {
                 {
                   type: 'alphabetical',
                   order: 'asc',
+                  fallbackSort: { type: 'unsorted' },
                   ignoreCase: true,
                   specialCharacters: 'keep',
                   partitionByComment: false,
@@ -692,6 +693,7 @@ let user = {
               {
                 type: 'alphabetical',
                 order: 'asc',
+                fallbackSort: { type: 'unsorted' },
                 ignoreCase: true,
                 specialCharacters: 'keep',
                 partitionByComment: false,
diff --git a/docs/content/rules/sort-sets.mdx b/docs/content/rules/sort-sets.mdx
index dfc9682..c890819 100644
--- a/docs/content/rules/sort-sets.mdx
+++ b/docs/content/rules/sort-sets.mdx
@@ -135,6 +135,7 @@ Specifies the sorting method.
 - `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
 - `'line-length'` — Sort items by the length of the code line (shorter lines first).
 - `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
+- `'unsorted'` — Do not sort items. [`grouping`](#groups) and [`newlines behavior`](#newlinesbetween) are still enforced.
 
 ### order
 
@@ -387,6 +388,7 @@ Custom groups have a higher priority than any predefined group.
                 {
                   type: 'alphabetical',
                   order: 'asc',
+                  fallbackSort: { type: 'unsorted' },
                   ignoreCase: true,
                   specialCharacters: 'keep',
                   groupKind: 'literals-first',
@@ -417,6 +419,7 @@ Custom groups have a higher priority than any predefined group.
               {
                 type: 'alphabetical',
                 order: 'asc',
+                fallbackSort: { type: 'unsorted' },
                 ignoreCase: true,
                 specialCharacters: 'keep',
                 groupKind: 'literals-first',
diff --git a/docs/content/rules/sort-switch-case.mdx b/docs/content/rules/sort-switch-case.mdx
index 76f8095..641077b 100644
--- a/docs/content/rules/sort-switch-case.mdx
+++ b/docs/content/rules/sort-switch-case.mdx
@@ -156,6 +156,7 @@ Specifies the sorting method.
 - `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
 - `'line-length'` — Sort items by the length of the code line (shorter lines first).
 - `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
+- `'unsorted'` — Do not sort items.
 
 ### order
 
@@ -243,6 +244,7 @@ Specifies the sorting locales. See [String.prototype.localeCompare() - locales](
                 {
                   type: 'alphabetical',
                   order: 'asc',
+                  fallbackSort: { type: 'unsorted' },
                   ignoreCase: true,
                   specialCharacters: 'keep',
                 },
@@ -267,6 +269,7 @@ Specifies the sorting locales. See [String.prototype.localeCompare() - locales](
               {
                 type: 'alphabetical',
                 order: 'asc',
+                fallbackSort: { type: 'unsorted' },
                 ignoreCase: true,
                 specialCharacters: 'keep',
               },
diff --git a/docs/content/rules/sort-union-types.mdx b/docs/content/rules/sort-union-types.mdx
index 7ee53db..10d5659 100644
--- a/docs/content/rules/sort-union-types.mdx
+++ b/docs/content/rules/sort-union-types.mdx
@@ -104,6 +104,7 @@ Specifies the sorting method.
 - `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
 - `'line-length'` — Sort items by the length of the code line (shorter lines first).
 - `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
+- `'unsorted'` — Do not sort items. [`grouping`](#groups) and [`newlines behavior`](#newlinesbetween) are still enforced.
 
 ### order
 
@@ -378,6 +379,7 @@ This feature is only applicable when `partitionByNewLine` is false.
                 {
                   type: 'alphabetical',
                   order: 'asc',
+                  fallbackSort: { type: 'unsorted' },
                   ignoreCase: true,
                   specialCharacters: 'keep',
                   partitionByComment: false,
@@ -406,6 +408,7 @@ This feature is only applicable when `partitionByNewLine` is false.
               {
                 type: 'alphabetical',
                 order: 'asc',
+                fallbackSort: { type: 'unsorted' },
                 ignoreCase: true,
                 specialCharacters: 'keep',
                 partitionByComment: false,
diff --git a/docs/content/rules/sort-variable-declarations.mdx b/docs/content/rules/sort-variable-declarations.mdx
index 8014568..7635aee 100644
--- a/docs/content/rules/sort-variable-declarations.mdx
+++ b/docs/content/rules/sort-variable-declarations.mdx
@@ -88,6 +88,7 @@ Specifies the sorting method.
 - `'natural'` — Sort items in a [natural](https://github.com/yobacca/natural-orderby) order (e.g., “item2” < “item10”).
 - `'line-length'` — Sort items by the length of the code line (shorter lines first).
 - `'custom'` — Sort items using the alphabet entered in the [`alphabet`](#alphabet) option.
+- `'unsorted'` — Do not sort items.
 
 ### order
 
@@ -209,6 +210,7 @@ Each group of variables (separated by empty lines) is treated independently, and
                 {
                   type: 'alphabetical',
                   order: 'asc',
+                  fallbackSort: { type: 'unsorted' },
                   ignoreCase: true,
                   specialCharacters: 'keep',
                   partitionByNewLine: false,
@@ -235,6 +237,7 @@ Each group of variables (separated by empty lines) is treated independently, and
               {
                 type: 'alphabetical',
                 order: 'asc',
+                fallbackSort: { type: 'unsorted' },
                 ignoreCase: true,
                 specialCharacters: 'keep',
                 partitionByNewLine: false,
diff --git a/rules/sort-array-includes.ts b/rules/sort-array-includes.ts
index 2a3b8bf..219bc23 100644
--- a/rules/sort-array-includes.ts
+++ b/rules/sort-array-includes.ts
@@ -12,7 +12,6 @@ import {
   partitionByCommentJsonSchema,
   partitionByNewLineJsonSchema,
   newlinesBetweenJsonSchema,
-  buildTypeJsonSchema,
   commonJsonSchemas,
   groupsJsonSchema,
 } from '../utils/common-json-schemas'
@@ -92,7 +91,6 @@ export let jsonSchema: JSONSchema4 = {
         singleCustomGroupJsonSchema,
       }),
       useConfigurationIf: buildUseConfigurationIfJsonSchema(),
-      type: buildTypeJsonSchema({ withUnsorted: true }),
       partitionByComment: partitionByCommentJsonSchema,
       partitionByNewLine: partitionByNewLineJsonSchema,
       newlinesBetween: newlinesBetweenJsonSchema,
@@ -181,19 +179,7 @@ export let sortArray = <MessageIds extends string>({
     contextOptions: context.options,
   })
 
-  let completeOptions = complete(
-    matchedContextOptions[0],
-    settings,
-    defaultOptions,
-  )
-  let { type } = completeOptions
-  if (type === 'unsorted') {
-    return
-  }
-  let options = {
-    ...completeOptions,
-    type,
-  }
+  let options = complete(matchedContextOptions[0], settings, defaultOptions)
   validateCustomSortConfiguration(options)
   validateGeneratedGroupsConfiguration({
     selectors: allSelectors,
diff --git a/rules/sort-array-includes/types.ts b/rules/sort-array-includes/types.ts
index e97b113..349579d 100644
--- a/rules/sort-array-includes/types.ts
+++ b/rules/sort-array-includes/types.ts
@@ -27,9 +27,9 @@ export type Options = Partial<
     customGroups: CustomGroupsOption<SingleCustomGroup>
     partitionByComment: PartitionByCommentOption
     newlinesBetween: NewlinesBetweenOption
-    type: TypeOption | 'unsorted'
     groups: GroupsOptions<Group>
     partitionByNewLine: boolean
+    type: TypeOption
   } & CommonOptions
 >[]
 
diff --git a/rules/sort-classes.ts b/rules/sort-classes.ts
index c2263d2..9d673ef 100644
--- a/rules/sort-classes.ts
+++ b/rules/sort-classes.ts
@@ -13,7 +13,6 @@ import {
   partitionByCommentJsonSchema,
   partitionByNewLineJsonSchema,
   newlinesBetweenJsonSchema,
-  buildTypeJsonSchema,
   commonJsonSchemas,
   groupsJsonSchema,
   regexJsonSchema,
@@ -663,7 +662,6 @@ export default createEslintRule<SortClassesOptions, MESSAGE_ID>({
           partitionByComment: partitionByCommentJsonSchema,
           partitionByNewLine: partitionByNewLineJsonSchema,
           newlinesBetween: newlinesBetweenJsonSchema,
-          type: buildTypeJsonSchema(),
           groups: groupsJsonSchema,
         },
         additionalProperties: false,
diff --git a/rules/sort-decorators.ts b/rules/sort-decorators.ts
index 21b07c0..f63d722 100644
--- a/rules/sort-decorators.ts
+++ b/rules/sort-decorators.ts
@@ -13,7 +13,6 @@ import type { SortingNode } from '../types/sorting-node'
 import {
   partitionByCommentJsonSchema,
   customGroupsJsonSchema,
-  buildTypeJsonSchema,
   commonJsonSchemas,
   groupsJsonSchema,
 } from '../utils/common-json-schemas'
@@ -166,7 +165,6 @@ export default createEslintRule<Options, MESSAGE_ID>({
           },
           partitionByComment: partitionByCommentJsonSchema,
           customGroups: customGroupsJsonSchema,
-          type: buildTypeJsonSchema(),
           groups: groupsJsonSchema,
         },
         additionalProperties: false,
diff --git a/rules/sort-enums.ts b/rules/sort-enums.ts
index 4fa4a3c..8a20e76 100644
--- a/rules/sort-enums.ts
+++ b/rules/sort-enums.ts
@@ -10,7 +10,6 @@ import {
   partitionByNewLineJsonSchema,
   newlinesBetweenJsonSchema,
   customGroupsJsonSchema,
-  buildTypeJsonSchema,
   commonJsonSchemas,
   groupsJsonSchema,
 } from '../utils/common-json-schemas'
@@ -288,7 +287,6 @@ export default createEslintRule<Options, MESSAGE_ID>({
           partitionByComment: partitionByCommentJsonSchema,
           partitionByNewLine: partitionByNewLineJsonSchema,
           newlinesBetween: newlinesBetweenJsonSchema,
-          type: buildTypeJsonSchema(),
           groups: groupsJsonSchema,
         },
         additionalProperties: false,
diff --git a/rules/sort-exports.ts b/rules/sort-exports.ts
index 99f9de1..177e8a8 100644
--- a/rules/sort-exports.ts
+++ b/rules/sort-exports.ts
@@ -10,7 +10,6 @@ import type { SortingNode } from '../types/sorting-node'
 import {
   partitionByCommentJsonSchema,
   partitionByNewLineJsonSchema,
-  buildTypeJsonSchema,
   commonJsonSchemas,
 } from '../utils/common-json-schemas'
 import { validateCustomSortConfiguration } from '../utils/validate-custom-sort-configuration'
@@ -162,7 +161,6 @@ export default createEslintRule<Options, MESSAGE_ID>({
           },
           partitionByComment: partitionByCommentJsonSchema,
           partitionByNewLine: partitionByNewLineJsonSchema,
-          type: buildTypeJsonSchema(),
         },
         additionalProperties: false,
         type: 'object',
diff --git a/rules/sort-heritage-clauses.ts b/rules/sort-heritage-clauses.ts
index 69b32af..6dfa69c 100644
--- a/rules/sort-heritage-clauses.ts
+++ b/rules/sort-heritage-clauses.ts
@@ -11,7 +11,6 @@ import type { SortingNode } from '../types/sorting-node'
 
 import {
   customGroupsJsonSchema,
-  buildTypeJsonSchema,
   commonJsonSchemas,
   groupsJsonSchema,
 } from '../utils/common-json-schemas'
@@ -65,7 +64,6 @@ export default createEslintRule<Options, MESSAGE_ID>({
         properties: {
           ...commonJsonSchemas,
           customGroups: customGroupsJsonSchema,
-          type: buildTypeJsonSchema(),
           groups: groupsJsonSchema,
         },
         additionalProperties: false,
diff --git a/rules/sort-imports.ts b/rules/sort-imports.ts
index 7463ce6..7a5200e 100644
--- a/rules/sort-imports.ts
+++ b/rules/sort-imports.ts
@@ -19,7 +19,6 @@ import {
   partitionByCommentJsonSchema,
   partitionByNewLineJsonSchema,
   newlinesBetweenJsonSchema,
-  buildTypeJsonSchema,
   commonJsonSchemas,
   groupsJsonSchema,
   regexJsonSchema,
@@ -594,7 +593,6 @@ export default createEslintRule<Options, MESSAGE_ID>({
           partitionByNewLine: partitionByNewLineJsonSchema,
           newlinesBetween: newlinesBetweenJsonSchema,
           internalPattern: regexJsonSchema,
-          type: buildTypeJsonSchema(),
           groups: groupsJsonSchema,
         },
         definitions: {
diff --git a/rules/sort-jsx-props.ts b/rules/sort-jsx-props.ts
index 7a7e326..20bb1c5 100644
--- a/rules/sort-jsx-props.ts
+++ b/rules/sort-jsx-props.ts
@@ -15,7 +15,6 @@ import {
   partitionByNewLineJsonSchema,
   newlinesBetweenJsonSchema,
   customGroupsJsonSchema,
-  buildTypeJsonSchema,
   commonJsonSchemas,
   groupsJsonSchema,
   regexJsonSchema,
@@ -52,13 +51,13 @@ type Options = Partial<
     }
     customGroups: DeprecatedCustomGroupsOption
     newlinesBetween: NewlinesBetweenOption
-    type: TypeOption | 'unsorted'
     groups: GroupsOptions<Group>
     partitionByNewLine: boolean
     /**
      * @deprecated for {@link `useConfigurationIf.tagMatchesPattern`}
      */
     ignorePattern: RegexOption
+    type: TypeOption
   } & CommonOptions
 >[]
 
@@ -112,19 +111,7 @@ export default createEslintRule<Options, MESSAGE_ID>({
           options.useConfigurationIf.tagMatchesPattern,
         )
       })
-      let completeOptions = complete(
-        matchedContextOptions,
-        settings,
-        defaultOptions,
-      )
-      let { type } = completeOptions
-      if (type === 'unsorted') {
-        return
-      }
-      let options = {
-        ...completeOptions,
-        type,
-      }
+      let options = complete(matchedContextOptions, settings, defaultOptions)
       validateCustomSortConfiguration(options)
       validateGroupsConfiguration({
         allowedPredefinedGroups: ['multiline', 'shorthand', 'unknown'],
@@ -231,7 +218,6 @@ export default createEslintRule<Options, MESSAGE_ID>({
               tagMatchesPattern: regexJsonSchema,
             },
           }),
-          type: buildTypeJsonSchema({ withUnsorted: true }),
           partitionByNewLine: partitionByNewLineJsonSchema,
           newlinesBetween: newlinesBetweenJsonSchema,
           customGroups: customGroupsJsonSchema,
diff --git a/rules/sort-maps.ts b/rules/sort-maps.ts
index 356998c..9140b7b 100644
--- a/rules/sort-maps.ts
+++ b/rules/sort-maps.ts
@@ -10,7 +10,6 @@ import {
   partitionByCommentJsonSchema,
   partitionByNewLineJsonSchema,
   newlinesBetweenJsonSchema,
-  buildTypeJsonSchema,
   commonJsonSchemas,
   groupsJsonSchema,
 } from '../utils/common-json-schemas'
@@ -211,7 +210,6 @@ export default createEslintRule<Options, MESSAGE_ID>({
           partitionByComment: partitionByCommentJsonSchema,
           partitionByNewLine: partitionByNewLineJsonSchema,
           newlinesBetween: newlinesBetweenJsonSchema,
-          type: buildTypeJsonSchema(),
           groups: groupsJsonSchema,
         },
         additionalProperties: false,
diff --git a/rules/sort-modules.ts b/rules/sort-modules.ts
index cb6b5f6..393a13a 100644
--- a/rules/sort-modules.ts
+++ b/rules/sort-modules.ts
@@ -15,7 +15,6 @@ import {
   partitionByCommentJsonSchema,
   partitionByNewLineJsonSchema,
   newlinesBetweenJsonSchema,
-  buildTypeJsonSchema,
   commonJsonSchemas,
   groupsJsonSchema,
 } from '../utils/common-json-schemas'
@@ -107,7 +106,6 @@ export default createEslintRule<SortModulesOptions, MESSAGE_ID>({
           partitionByComment: partitionByCommentJsonSchema,
           partitionByNewLine: partitionByNewLineJsonSchema,
           newlinesBetween: newlinesBetweenJsonSchema,
-          type: buildTypeJsonSchema(),
           groups: groupsJsonSchema,
         },
         additionalProperties: false,
diff --git a/rules/sort-named-exports.ts b/rules/sort-named-exports.ts
index 8c92d83..e4d4d1f 100644
--- a/rules/sort-named-exports.ts
+++ b/rules/sort-named-exports.ts
@@ -10,7 +10,6 @@ import type { SortingNode } from '../types/sorting-node'
 import {
   partitionByCommentJsonSchema,
   partitionByNewLineJsonSchema,
-  buildTypeJsonSchema,
   commonJsonSchemas,
 } from '../utils/common-json-schemas'
 import { validateCustomSortConfiguration } from '../utils/validate-custom-sort-configuration'
@@ -178,7 +177,6 @@ export default createEslintRule<Options, MESSAGE_ID>({
           },
           partitionByComment: partitionByCommentJsonSchema,
           partitionByNewLine: partitionByNewLineJsonSchema,
-          type: buildTypeJsonSchema(),
         },
         additionalProperties: false,
         type: 'object',
diff --git a/rules/sort-named-imports.ts b/rules/sort-named-imports.ts
index aba49ac..1886a37 100644
--- a/rules/sort-named-imports.ts
+++ b/rules/sort-named-imports.ts
@@ -10,7 +10,6 @@ import type { SortingNode } from '../types/sorting-node'
 import {
   partitionByCommentJsonSchema,
   partitionByNewLineJsonSchema,
-  buildTypeJsonSchema,
   commonJsonSchemas,
 } from '../utils/common-json-schemas'
 import { validateCustomSortConfiguration } from '../utils/validate-custom-sort-configuration'
@@ -176,7 +175,6 @@ export default createEslintRule<Options, MESSAGE_ID>({
           },
           partitionByComment: partitionByCommentJsonSchema,
           partitionByNewLine: partitionByNewLineJsonSchema,
-          type: buildTypeJsonSchema(),
         },
         additionalProperties: false,
         type: 'object',
diff --git a/rules/sort-object-types.ts b/rules/sort-object-types.ts
index a4ad15a..3446dc7 100644
--- a/rules/sort-object-types.ts
+++ b/rules/sort-object-types.ts
@@ -13,7 +13,6 @@ import {
   partitionByNewLineJsonSchema,
   newlinesBetweenJsonSchema,
   customGroupsJsonSchema,
-  buildTypeJsonSchema,
   commonJsonSchemas,
   groupsJsonSchema,
   regexJsonSchema,
@@ -105,7 +104,6 @@ export let jsonSchema: JSONSchema4 = {
         description: 'Specifies top-level groups.',
         type: 'string',
       },
-      type: buildTypeJsonSchema({ withUnsorted: true }),
       partitionByComment: partitionByCommentJsonSchema,
       partitionByNewLine: partitionByNewLineJsonSchema,
       newlinesBetween: newlinesBetweenJsonSchema,
@@ -196,19 +194,7 @@ export let sortObjectTypeElements = <MessageIds extends string>({
       options.useConfigurationIf.declarationMatchesPattern,
     )
   })
-  let completeOptions = complete(
-    matchedContextOptions,
-    settings,
-    defaultOptions,
-  )
-  let { type } = completeOptions
-  if (type === 'unsorted') {
-    return
-  }
-  let options = {
-    ...completeOptions,
-    type,
-  }
+  let options = complete(matchedContextOptions, settings, defaultOptions)
   validateCustomSortConfiguration(options)
   validateGeneratedGroupsConfiguration({
     selectors: allSelectors,
diff --git a/rules/sort-object-types/types.ts b/rules/sort-object-types/types.ts
index f59153f..05e82ab 100644
--- a/rules/sort-object-types/types.ts
+++ b/rules/sort-object-types/types.ts
@@ -33,13 +33,13 @@ export type Options = Partial<
     groupKind: 'required-first' | 'optional-first' | 'mixed'
     partitionByComment: PartitionByCommentOption
     newlinesBetween: NewlinesBetweenOption
-    type: TypeOption | 'unsorted'
     groups: GroupsOptions<Group>
     partitionByNewLine: boolean
     /**
      * @deprecated for {@link `useConfigurationIf.declarationMatchesPattern`}
      */
     ignorePattern: RegexOption
+    type: TypeOption
   } & CommonOptions
 >[]
 
diff --git a/rules/sort-objects.ts b/rules/sort-objects.ts
index 46af319..695f427 100644
--- a/rules/sort-objects.ts
+++ b/rules/sort-objects.ts
@@ -11,7 +11,6 @@ import {
   partitionByNewLineJsonSchema,
   newlinesBetweenJsonSchema,
   customGroupsJsonSchema,
-  buildTypeJsonSchema,
   commonJsonSchemas,
   groupsJsonSchema,
   regexJsonSchema,
@@ -123,19 +122,7 @@ export default createEslintRule<Options, MESSAGE_ID>({
         )
       })
 
-      let completeOptions = complete(
-        matchedContextOptions,
-        settings,
-        defaultOptions,
-      )
-      let { type } = completeOptions
-      if (type === 'unsorted') {
-        return
-      }
-      let options = {
-        ...completeOptions,
-        type,
-      }
+      let options = complete(matchedContextOptions, settings, defaultOptions)
       validateCustomSortConfiguration(options)
       validateGeneratedGroupsConfiguration({
         selectors: allSelectors,
@@ -498,7 +485,6 @@ export default createEslintRule<Options, MESSAGE_ID>({
             description: 'Controls whether to sort styled components.',
             type: 'boolean',
           },
-          type: buildTypeJsonSchema({ withUnsorted: true }),
           partitionByComment: partitionByCommentJsonSchema,
           partitionByNewLine: partitionByNewLineJsonSchema,
           newlinesBetween: newlinesBetweenJsonSchema,
diff --git a/rules/sort-objects/types.ts b/rules/sort-objects/types.ts
index 96dd0ca..2f37d66 100644
--- a/rules/sort-objects/types.ts
+++ b/rules/sort-objects/types.ts
@@ -30,7 +30,6 @@ export type Options = Partial<
     destructuredObjects: { groups: boolean } | boolean
     partitionByComment: PartitionByCommentOption
     newlinesBetween: NewlinesBetweenOption
-    type: TypeOption | 'unsorted'
     groups: GroupsOptions<Group>
     partitionByNewLine: boolean
     objectDeclarations: boolean
@@ -40,6 +39,7 @@ export type Options = Partial<
      * @deprecated for {@link `destructuredObjects`} and {@link `objectDeclarations`}
      */
     destructureOnly: boolean
+    type: TypeOption
   } & CommonOptions
 >[]
 
diff --git a/rules/sort-switch-case.ts b/rules/sort-switch-case.ts
index 72b5726..41d6409 100644
--- a/rules/sort-switch-case.ts
+++ b/rules/sort-switch-case.ts
@@ -6,12 +6,9 @@ import type { SortingNode } from '../types/sorting-node'
 
 import { makeSingleNodeCommentAfterFixes } from '../utils/make-single-node-comment-after-fixes'
 import { validateCustomSortConfiguration } from '../utils/validate-custom-sort-configuration'
-import {
-  buildTypeJsonSchema,
-  commonJsonSchemas,
-} from '../utils/common-json-schemas'
 import { reportErrors, ORDER_ERROR, RIGHT, LEFT } from '../utils/report-errors'
 import { createNodeIndexMap } from '../utils/create-node-index-map'
+import { commonJsonSchemas } from '../utils/common-json-schemas'
 import { createEslintRule } from '../utils/create-eslint-rule'
 import { getSourceCode } from '../utils/get-source-code'
 import { rangeToDiff } from '../utils/range-to-diff'
@@ -265,7 +262,6 @@ export default createEslintRule<Options, MESSAGE_ID>({
       {
         properties: {
           ...commonJsonSchemas,
-          type: buildTypeJsonSchema(),
         },
         additionalProperties: false,
         type: 'object',
diff --git a/rules/sort-union-types.ts b/rules/sort-union-types.ts
index 68f6c72..c77d199 100644
--- a/rules/sort-union-types.ts
+++ b/rules/sort-union-types.ts
@@ -15,7 +15,6 @@ import {
   partitionByCommentJsonSchema,
   partitionByNewLineJsonSchema,
   newlinesBetweenJsonSchema,
-  buildTypeJsonSchema,
   commonJsonSchemas,
   groupsJsonSchema,
 } from '../utils/common-json-schemas'
@@ -93,7 +92,6 @@ export let jsonSchema: JSONSchema4 = {
     partitionByComment: partitionByCommentJsonSchema,
     partitionByNewLine: partitionByNewLineJsonSchema,
     newlinesBetween: newlinesBetweenJsonSchema,
-    type: buildTypeJsonSchema(),
     groups: groupsJsonSchema,
   },
   additionalProperties: false,
diff --git a/rules/sort-variable-declarations.ts b/rules/sort-variable-declarations.ts
index 5ff6963..c2af70b 100644
--- a/rules/sort-variable-declarations.ts
+++ b/rules/sort-variable-declarations.ts
@@ -10,7 +10,6 @@ import type { SortingNodeWithDependencies } from '../utils/sort-nodes-by-depende
 import {
   partitionByCommentJsonSchema,
   partitionByNewLineJsonSchema,
-  buildTypeJsonSchema,
   commonJsonSchemas,
 } from '../utils/common-json-schemas'
 import { validateCustomSortConfiguration } from '../utils/validate-custom-sort-configuration'
@@ -248,7 +247,6 @@ export default createEslintRule<Options, MESSAGE_ID>({
           ...commonJsonSchemas,
           partitionByComment: partitionByCommentJsonSchema,
           partitionByNewLine: partitionByNewLineJsonSchema,
-          type: buildTypeJsonSchema(),
         },
         additionalProperties: false,
         type: 'object',
diff --git a/types/common-options.ts b/types/common-options.ts
index f6bd968..adf9822 100644
--- a/types/common-options.ts
+++ b/types/common-options.ts
@@ -1,16 +1,11 @@
-export type CustomGroupsOption<SingleCustomGroup = object> = ((
-  | {
-      type?: TypeOption | 'unsorted'
-      order?: OrderOption
-    }
-  | {
-      type?: 'unsorted'
-    }
-) & {
+export type CustomGroupsOption<SingleCustomGroup = object> = ({
   newlinesInside?: 'always' | 'never'
   fallbackSort?: FallbackSortOption
   groupName: string
-} & (AnyOfCustomGroup<SingleCustomGroup> | SingleCustomGroup))[]
+} & (AnyOfCustomGroup<SingleCustomGroup> | SingleCustomGroup) & {
+    order?: OrderOption
+    type?: TypeOption
+  })[]
 
 export interface CommonOptions {
   specialCharacters: SpecialCharactersOption
@@ -29,22 +24,27 @@ export type PartitionByCommentOption =
   | RegexOption
   | boolean
 
+export type TypeOption =
+  | 'alphabetical'
+  | 'line-length'
+  | 'unsorted'
+  | 'natural'
+  | 'custom'
+
 export type GroupsOptions<T> = (
   | { newlinesBetween: NewlinesBetweenOption }
   | T[]
   | T
 )[]
 
-export interface FallbackSortOption {
-  type: TypeOption | 'unsorted'
-  order?: OrderOption
-}
-
 export interface AnyOfCustomGroup<SingleCustomGroup> {
   anyOf: SingleCustomGroup[]
 }
 
-export type TypeOption = 'alphabetical' | 'line-length' | 'natural' | 'custom'
+export interface FallbackSortOption {
+  order?: OrderOption
+  type: TypeOption
+}
 
 export type DeprecatedCustomGroupsOption = Record<string, string[] | string>
 
diff --git a/utils/common-json-schemas.ts b/utils/common-json-schemas.ts
index 76cfb8c..e793fcb 100644
--- a/utils/common-json-schemas.ts
+++ b/utils/common-json-schemas.ts
@@ -1,17 +1,9 @@
 import type { JSONSchema4 } from '@typescript-eslint/utils/json-schema'
 
-export let buildTypeJsonSchema = ({
-  withUnsorted,
-}: { withUnsorted?: boolean } = {}): JSONSchema4 => {
-  let enumValues = ['alphabetical', 'natural', 'line-length', 'custom']
-  if (withUnsorted) {
-    enumValues.push('unsorted')
-  }
-  return {
-    description: 'Specifies the sorting method.',
-    enum: enumValues,
-    type: 'string',
-  }
+let typeJsonSchema: JSONSchema4 = {
+  enum: ['alphabetical', 'natural', 'line-length', 'custom', 'unsorted'],
+  description: 'Specifies the sorting method.',
+  type: 'string',
 }
 
 let orderJsonSchema: JSONSchema4 = {
@@ -55,8 +47,8 @@ let specialCharactersJsonSchema: JSONSchema4 = {
 
 let fallbackSortJsonSchema: JSONSchema4 = {
   properties: {
-    type: buildTypeJsonSchema(),
     order: orderJsonSchema,
+    type: typeJsonSchema,
   },
   description: 'Fallback sort order.',
   type: 'object',
@@ -69,6 +61,7 @@ export let commonJsonSchemas: Record<string, JSONSchema4> = {
   alphabet: alphabetJsonSchema,
   locales: localesJsonSchema,
   order: orderJsonSchema,
+  type: typeJsonSchema,
 }
 
 export let newlinesBetweenJsonSchema: JSONSchema4 = {
diff --git a/utils/compare.ts b/utils/compare.ts
index 31b6c1e..6b58ac2 100644
--- a/utils/compare.ts
+++ b/utils/compare.ts
@@ -12,6 +12,7 @@ import { convertBooleanToSign } from './convert-boolean-to-sign'
 export type CompareOptions<T extends SortingNode> =
   | AlphabeticalCompareOptions<T>
   | LineLengthCompareOptions<T>
+  | UnsortedCompareOptions<T>
   | NaturalCompareOptions<T>
   | CustomCompareOptions<T>
 
@@ -55,6 +56,11 @@ interface LineLengthCompareOptions<T extends SortingNode>
   type: 'line-length'
 }
 
+interface UnsortedCompareOptions<T extends SortingNode>
+  extends BaseCompareOptions<T> {
+  type: 'unsorted'
+}
+
 type SortingFunction<T extends SortingNode> = (a: T, b: T) => number
 
 type IndexByCharacters = Map<string, number>
@@ -75,6 +81,8 @@ export let compare = <T extends SortingNode>(
     case 'line-length':
       sortingFunction = getLineLengthSortingFunction(options, nodeValueGetter)
       break
+    case 'unsorted':
+      return 0
     case 'natural':
       sortingFunction = getNaturalSortingFunction(options, nodeValueGetter)
       break
@@ -91,10 +99,6 @@ export let compare = <T extends SortingNode>(
   }
 
   let { fallbackSort, order } = options
-  if (fallbackSort.type === 'unsorted') {
-    return 0
-  }
-
   return compare(a, b, {
     ...options,
     order: fallbackSort.order ?? order,
diff --git a/utils/get-custom-groups-compare-options.ts b/utils/get-custom-groups-compare-options.ts
index 1fa1aeb..b56fa8a 100644
--- a/utils/get-custom-groups-compare-options.ts
+++ b/utils/get-custom-groups-compare-options.ts
@@ -39,15 +39,10 @@ export let getCustomGroupsCompareOptions = <T extends SortingNode>(
           currentGroup => group === currentGroup.groupName,
         )
       : null
-  if (customGroup?.type === 'unsorted') {
-    return null
-  }
+
   return {
     ...options,
-    order:
-      customGroup && 'order' in customGroup && customGroup.order
-        ? customGroup.order
-        : options.order,
+    order: customGroup?.order ?? options.order,
     type: customGroup?.type ?? options.type,
   }
 }


Test patch:
diff --git a/test/rules/sort-array-includes.test.ts b/test/rules/sort-array-includes.test.ts
index e3df0f3..5c67805 100644
--- a/test/rules/sort-array-includes.test.ts
+++ b/test/rules/sort-array-includes.test.ts
@@ -2585,8 +2585,15 @@ describe(ruleName, () => {
     })
   })
 
-  describe(`${ruleName}: misc`, () => {
-    ruleTester.run(`${ruleName}: allows to use "unsorted" as type`, rule, {
+  describe(`${ruleName}: unsorted type`, () => {
+    let type = 'unsorted'
+
+    let options = {
+      type: 'unsorted',
+      order: 'asc',
+    } as const
+
+    ruleTester.run(`${ruleName}(${type}): does not enforce sorting`, rule, {
       valid: [
         {
           code: dedent`
@@ -2596,16 +2603,112 @@ describe(ruleName, () => {
               'a'
             ].includes(value)
           `,
+          options: [options],
+        },
+      ],
+      invalid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces grouping`, rule, {
+      invalid: [
+        {
           options: [
             {
-              type: 'unsorted',
+              ...options,
+              customGroups: [
+                {
+                  elementNamePattern: '^a',
+                  groupName: 'a',
+                },
+                {
+                  elementNamePattern: '^b',
+                  groupName: 'b',
+                },
+              ],
+              groups: ['b', 'a'],
+            },
+          ],
+          errors: [
+            {
+              data: {
+                rightGroup: 'b',
+                leftGroup: 'a',
+                right: 'ba',
+                left: 'aa',
+              },
+              messageId: 'unexpectedArrayIncludesGroupOrder',
             },
           ],
+          output: dedent`
+            [
+              'ba',
+              'bb',
+              'ab',
+              'aa',
+            ].includes(value)
+          `,
+          code: dedent`
+            [
+              'ab',
+              'aa',
+              'ba',
+              'bb',
+            ].includes(value)
+          `,
         },
       ],
-      invalid: [],
+      valid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces newlines between`, rule, {
+      invalid: [
+        {
+          options: [
+            {
+              ...options,
+              customGroups: [
+                {
+                  elementNamePattern: 'a',
+                  groupName: 'a',
+                },
+                {
+                  elementNamePattern: 'b',
+                  groupName: 'b',
+                },
+              ],
+              newlinesBetween: 'always',
+              groups: ['b', 'a'],
+            },
+          ],
+          errors: [
+            {
+              data: {
+                right: 'a',
+                left: 'b',
+              },
+              messageId: 'missedSpacingBetweenArrayIncludesMembers',
+            },
+          ],
+          output: dedent`
+            [
+              'b',
+
+              'a',
+            ].includes(value)
+          `,
+          code: dedent`
+            [
+              'b',
+              'a',
+            ].includes(value)
+          `,
+        },
+      ],
+      valid: [],
     })
+  })
 
+  describe(`${ruleName}: misc`, () => {
     ruleTester.run(
       `${ruleName}: sets alphabetical asc sorting as default`,
       rule,
diff --git a/test/rules/sort-classes.test.ts b/test/rules/sort-classes.test.ts
index 86d2ec0..41e8e71 100644
--- a/test/rules/sort-classes.test.ts
+++ b/test/rules/sort-classes.test.ts
@@ -8471,6 +8471,163 @@ describe(ruleName, () => {
     })
   })
 
+  describe(`${ruleName}: unsorted type`, () => {
+    let type = 'unsorted'
+
+    let options = {
+      type: 'unsorted',
+      order: 'asc',
+    } as const
+
+    ruleTester.run(`${ruleName}(${type}): does not enforce sorting`, rule, {
+      valid: [
+        {
+          code: dedent`
+            class Class {
+              b
+              c
+              a
+            }
+          `,
+          options: [options],
+        },
+      ],
+      invalid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces grouping`, rule, {
+      invalid: [
+        {
+          options: [
+            {
+              ...options,
+              customGroups: [
+                {
+                  elementNamePattern: '^a',
+                  groupName: 'a',
+                },
+                {
+                  elementNamePattern: '^b',
+                  groupName: 'b',
+                },
+              ],
+              groups: ['b', 'a'],
+            },
+          ],
+          errors: [
+            {
+              data: {
+                rightGroup: 'b',
+                leftGroup: 'a',
+                right: 'ba',
+                left: 'aa',
+              },
+              messageId: 'unexpectedClassesGroupOrder',
+            },
+          ],
+          output: dedent`
+            class Class {
+              ba
+              bb
+              ab
+              aa
+            }
+          `,
+          code: dedent`
+            class Class {
+              ab
+              aa
+              ba
+              bb
+            }
+          `,
+        },
+      ],
+      valid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces newlines between`, rule, {
+      invalid: [
+        {
+          options: [
+            {
+              ...options,
+              customGroups: [
+                {
+                  elementNamePattern: 'a',
+                  groupName: 'a',
+                },
+                {
+                  elementNamePattern: 'b',
+                  groupName: 'b',
+                },
+              ],
+              newlinesBetween: 'always',
+              groups: ['b', 'a'],
+            },
+          ],
+          errors: [
+            {
+              data: {
+                right: 'a',
+                left: 'b',
+              },
+              messageId: 'missedSpacingBetweenClassMembers',
+            },
+          ],
+          output: dedent`
+            class Class {
+              b
+
+              a
+            }
+          `,
+          code: dedent`
+            class Class {
+              b
+              a
+            }
+          `,
+        },
+      ],
+      valid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces dependency sorting`, rule, {
+      invalid: [
+        {
+          errors: [
+            {
+              data: {
+                nodeDependentOnRight: 'a',
+                right: 'b',
+              },
+              messageId: 'unexpectedClassesDependencyOrder',
+            },
+          ],
+          output: dedent`
+            class Class {
+              b
+              a = this.b
+            }
+          `,
+          code: dedent`
+            class Class {
+              a = this.b
+              b
+            }
+          `,
+          options: [
+            {
+              ...options,
+            },
+          ],
+        },
+      ],
+      valid: [],
+    })
+  })
+
   describe(`${ruleName}: misc`, () => {
     ruleTester.run(
       `${ruleName}: sets alphabetical asc sorting as default`,
diff --git a/test/rules/sort-decorators.test.ts b/test/rules/sort-decorators.test.ts
index c63f53e..f7bd254 100644
--- a/test/rules/sort-decorators.test.ts
+++ b/test/rules/sort-decorators.test.ts
@@ -3988,6 +3988,141 @@ describe(ruleName, () => {
     )
   })
 
+  describe(`${ruleName}: unsorted type`, () => {
+    let type = 'unsorted'
+
+    let options = {
+      type: 'unsorted',
+      order: 'asc',
+    } as const
+
+    ruleTester.run(`${ruleName}(${type}): does not enforce sorting`, rule, {
+      valid: [
+        {
+          code: dedent`
+            @B
+            @C
+            @A
+            class Class {
+
+              @B
+              @C
+              @A
+              property
+
+              @B
+              @C
+              @A
+              accessor field
+
+              @B
+              @C
+              @A
+              method(
+                @B
+                @C
+                @A
+                parameter) {}
+            }
+          `,
+          options: [options],
+        },
+      ],
+      invalid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces grouping`, rule, {
+      invalid: [
+        {
+          output: dedent`
+            @BA
+            @BB
+            @AB
+            @AA
+            class Class {
+
+              @BA
+              @BB
+              @AB
+              @AA
+              property
+
+              @BA
+              @BB
+              @AB
+              @AA
+              accessor field
+
+              @BA
+              @BB
+              @AB
+              @AA
+              method(
+                @BA
+                @BB
+                @AB
+                @AA
+                parameter) {}
+            }
+          `,
+          code: dedent`
+            @AB
+            @AA
+            @BA
+            @BB
+            class Class {
+
+              @AB
+              @AA
+              @BA
+              @BB
+              property
+
+              @AB
+              @AA
+              @BA
+              @BB
+              accessor field
+
+              @AB
+              @AA
+              @BA
+              @BB
+              method(
+                @AB
+                @AA
+                @BA
+                @BB
+                parameter) {}
+            }
+          `,
+          errors: duplicate5Times([
+            {
+              data: {
+                rightGroup: 'B',
+                leftGroup: 'A',
+                right: 'BA',
+                left: 'AA',
+              },
+              messageId: 'unexpectedDecoratorsGroupOrder',
+            },
+          ]),
+          options: [
+            {
+              ...options,
+              customGroups: {
+                A: '^A',
+                B: '^B',
+              },
+              groups: ['B', 'A'],
+            },
+          ],
+        },
+      ],
+      valid: [],
+    })
+  })
+
   describe(`${ruleName}: misc`, () => {
     ruleTester.run(
       `${ruleName}: sets alphabetical asc sorting as default`,
diff --git a/test/rules/sort-enums.test.ts b/test/rules/sort-enums.test.ts
index 2cb758c..b074505 100644
--- a/test/rules/sort-enums.test.ts
+++ b/test/rules/sort-enums.test.ts
@@ -2746,6 +2746,163 @@ describe(ruleName, () => {
     )
   })
 
+  describe(`${ruleName}: unsorted type`, () => {
+    let type = 'unsorted'
+
+    let options = {
+      type: 'unsorted',
+      order: 'asc',
+    } as const
+
+    ruleTester.run(`${ruleName}(${type}): does not enforce sorting`, rule, {
+      valid: [
+        {
+          code: dedent`
+            enum Enum {
+              b = 'b',
+              c = 'c',
+              a = 'a',
+            }
+          `,
+          options: [options],
+        },
+      ],
+      invalid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces grouping`, rule, {
+      invalid: [
+        {
+          options: [
+            {
+              ...options,
+              customGroups: [
+                {
+                  elementNamePattern: '^a',
+                  groupName: 'a',
+                },
+                {
+                  elementNamePattern: '^b',
+                  groupName: 'b',
+                },
+              ],
+              groups: ['b', 'a'],
+            },
+          ],
+          errors: [
+            {
+              data: {
+                rightGroup: 'b',
+                leftGroup: 'a',
+                right: 'ba',
+                left: 'aa',
+              },
+              messageId: 'unexpectedEnumsGroupOrder',
+            },
+          ],
+          output: dedent`
+            enum Enum {
+              ba = 'ba',
+              bb = 'bb',
+              ab = 'ab',
+              aa = 'aa',
+            }
+          `,
+          code: dedent`
+            enum Enum {
+              ab = 'ab',
+              aa = 'aa',
+              ba = 'ba',
+              bb = 'bb',
+            }
+          `,
+        },
+      ],
+      valid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces newlines between`, rule, {
+      invalid: [
+        {
+          options: [
+            {
+              ...options,
+              customGroups: [
+                {
+                  elementNamePattern: 'a',
+                  groupName: 'a',
+                },
+                {
+                  elementNamePattern: 'b',
+                  groupName: 'b',
+                },
+              ],
+              newlinesBetween: 'always',
+              groups: ['b', 'a'],
+            },
+          ],
+          errors: [
+            {
+              data: {
+                right: 'a',
+                left: 'b',
+              },
+              messageId: 'missedSpacingBetweenEnumsMembers',
+            },
+          ],
+          output: dedent`
+            enum Enum {
+              b = 'b',
+
+              a = 'a',
+            }
+          `,
+          code: dedent`
+            enum Enum {
+              b = 'b',
+              a = 'a',
+            }
+          `,
+        },
+      ],
+      valid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces dependency sorting`, rule, {
+      invalid: [
+        {
+          errors: [
+            {
+              data: {
+                nodeDependentOnRight: 'a',
+                right: 'b',
+              },
+              messageId: 'unexpectedEnumsDependencyOrder',
+            },
+          ],
+          output: dedent`
+            enum Enum {
+              b = 1,
+              a = b,
+            }
+          `,
+          code: dedent`
+            enum Enum {
+              a = b,
+              b = 1,
+            }
+          `,
+          options: [
+            {
+              ...options,
+            },
+          ],
+        },
+      ],
+      valid: [],
+    })
+  })
+
   describe(`${ruleName}: misc`, () => {
     ruleTester.run(`${ruleName}: detects numeric enums`, rule, {
       valid: [
diff --git a/test/rules/sort-exports.test.ts b/test/rules/sort-exports.test.ts
index 8aea1e4..97c2a39 100644
--- a/test/rules/sort-exports.test.ts
+++ b/test/rules/sort-exports.test.ts
@@ -1379,6 +1379,29 @@ describe(ruleName, () => {
     )
   })
 
+  describe(`${ruleName}: unsorted type`, () => {
+    let type = 'unsorted'
+
+    let options = {
+      type: 'unsorted',
+      order: 'asc',
+    } as const
+
+    ruleTester.run(`${ruleName}(${type}): does not enforce sorting`, rule, {
+      valid: [
+        {
+          code: dedent`
+            export * from 'b'
+            export * from 'c'
+            export * from 'a'
+          `,
+          options: [options],
+        },
+      ],
+      invalid: [],
+    })
+  })
+
   describe('misc', () => {
     ruleTester.run(
       `${ruleName}: sets alphabetical asc sorting as default`,
diff --git a/test/rules/sort-heritage-clauses.test.ts b/test/rules/sort-heritage-clauses.test.ts
index 65c09d8..5a69b26 100644
--- a/test/rules/sort-heritage-clauses.test.ts
+++ b/test/rules/sort-heritage-clauses.test.ts
@@ -1189,6 +1189,76 @@ describe(ruleName, () => {
     )
   })
 
+  describe(`${ruleName}: unsorted type`, () => {
+    let type = 'unsorted'
+
+    let options = {
+      type: 'unsorted',
+      order: 'asc',
+    } as const
+
+    ruleTester.run(`${ruleName}(${type}): does not enforce sorting`, rule, {
+      valid: [
+        {
+          code: dedent`
+            interface Interface extends
+              b,
+              c,
+              a
+            {}
+          `,
+          options: [options],
+        },
+      ],
+      invalid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces grouping`, rule, {
+      invalid: [
+        {
+          errors: [
+            {
+              data: {
+                rightGroup: 'b',
+                leftGroup: 'a',
+                right: 'ba',
+                left: 'aa',
+              },
+              messageId: 'unexpectedHeritageClausesGroupOrder',
+            },
+          ],
+          options: [
+            {
+              ...options,
+              customGroups: {
+                a: '^a',
+                b: '^b',
+              },
+              groups: ['b', 'a'],
+            },
+          ],
+          output: dedent`
+            interface Interface extends
+              ba,
+              bb,
+              ab,
+              aa
+            {}
+          `,
+          code: dedent`
+            interface Interface extends
+              ab,
+              aa,
+              ba,
+              bb
+            {}
+          `,
+        },
+      ],
+      valid: [],
+    })
+  })
+
   describe(`${ruleName}: misc`, () => {
     ruleTester.run(
       `${ruleName}: sets alphabetical asc sorting as default`,
diff --git a/test/rules/sort-imports.test.ts b/test/rules/sort-imports.test.ts
index 7e645e6..2a27929 100644
--- a/test/rules/sort-imports.test.ts
+++ b/test/rules/sort-imports.test.ts
@@ -6141,6 +6141,112 @@ describe(ruleName, () => {
     )
   })
 
+  describe(`${ruleName}: unsorted type`, () => {
+    let type = 'unsorted'
+
+    let options = {
+      type: 'unsorted',
+      order: 'asc',
+    } as const
+
+    ruleTester.run(`${ruleName}(${type}): does not enforce sorting`, rule, {
+      valid: [
+        {
+          code: dedent`
+            import { b } from 'b';
+            import { c } from 'c';
+            import { a } from 'a';
+          `,
+          options: [options],
+        },
+      ],
+      invalid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces grouping`, rule, {
+      invalid: [
+        {
+          errors: [
+            {
+              data: {
+                rightGroup: 'b',
+                leftGroup: 'a',
+                right: 'ba',
+                left: 'aa',
+              },
+              messageId: 'unexpectedImportsGroupOrder',
+            },
+          ],
+          options: [
+            {
+              ...options,
+              customGroups: {
+                value: {
+                  a: '^a',
+                  b: '^b',
+                },
+              },
+              groups: ['b', 'a'],
+            },
+          ],
+          output: dedent`
+            import { ba } from 'ba'
+            import { bb } from 'bb'
+
+            import { ab } from 'ab'
+            import { aa } from 'aa'
+          `,
+          code: dedent`
+            import { ab } from 'ab'
+            import { aa } from 'aa'
+            import { ba } from 'ba'
+            import { bb } from 'bb'
+          `,
+        },
+      ],
+      valid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces newlines between`, rule, {
+      invalid: [
+        {
+          options: [
+            {
+              ...options,
+              customGroups: {
+                value: {
+                  a: '^a',
+                  b: '^b',
+                },
+              },
+              newlinesBetween: 'never',
+              groups: ['b', 'a'],
+            },
+          ],
+          errors: [
+            {
+              data: {
+                right: 'a',
+                left: 'b',
+              },
+              messageId: 'extraSpacingBetweenImports',
+            },
+          ],
+          output: dedent`
+            import { b } from 'b'
+            import { a } from 'a'
+          `,
+          code: dedent`
+            import { b } from 'b'
+
+            import { a } from 'a'
+          `,
+        },
+      ],
+      valid: [],
+    })
+  })
+
   describe(`${ruleName}: misc`, () => {
     ruleTester.run(
       `${ruleName}: sets alphabetical asc sorting as default`,
diff --git a/test/rules/sort-interfaces.test.ts b/test/rules/sort-interfaces.test.ts
index 5cad3b5..347157c 100644
--- a/test/rules/sort-interfaces.test.ts
+++ b/test/rules/sort-interfaces.test.ts
@@ -4703,6 +4703,129 @@ describe(ruleName, () => {
     )
   })
 
+  describe(`${ruleName}: unsorted type`, () => {
+    let type = 'unsorted'
+
+    let options = {
+      type: 'unsorted',
+      order: 'asc',
+    } as const
+
+    ruleTester.run(`${ruleName}(${type}): does not enforce sorting`, rule, {
+      valid: [
+        {
+          code: dedent`
+            interface Interface {
+              b: string;
+              c: string;
+              a: string;
+            }
+          `,
+          options: [options],
+        },
+      ],
+      invalid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces grouping`, rule, {
+      invalid: [
+        {
+          options: [
+            {
+              ...options,
+              customGroups: [
+                {
+                  elementNamePattern: '^a',
+                  groupName: 'a',
+                },
+                {
+                  elementNamePattern: '^b',
+                  groupName: 'b',
+                },
+              ],
+              groups: ['b', 'a'],
+            },
+          ],
+          errors: [
+            {
+              data: {
+                rightGroup: 'b',
+                leftGroup: 'a',
+                right: 'ba',
+                left: 'aa',
+              },
+              messageId: 'unexpectedInterfacePropertiesGroupOrder',
+            },
+          ],
+          output: dedent`
+            interface Interface {
+              ba: string
+              bb: string
+              ab: string
+              aa: string
+            }
+          `,
+          code: dedent`
+            interface Interface {
+              ab: string
+              aa: string
+              ba: string
+              bb: string
+            }
+          `,
+        },
+      ],
+      valid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces newlines between`, rule, {
+      invalid: [
+        {
+          options: [
+            {
+              ...options,
+              customGroups: [
+                {
+                  elementNamePattern: 'a',
+                  groupName: 'a',
+                },
+                {
+                  elementNamePattern: 'b',
+                  groupName: 'b',
+                },
+              ],
+              newlinesBetween: 'always',
+              groups: ['b', 'a'],
+            },
+          ],
+          errors: [
+            {
+              data: {
+                right: 'a',
+                left: 'b',
+              },
+              messageId: 'missedSpacingBetweenInterfaceMembers',
+            },
+          ],
+          output: dedent`
+            interface Interface {
+              b: string
+
+              a: string
+            }
+          `,
+          code: dedent`
+            interface Interface {
+              b: string
+              a: string
+            }
+          `,
+        },
+      ],
+      valid: [],
+    })
+  })
+
   describe(`${ruleName}: validating group configuration`, () => {
     ruleTester.run(
       `${ruleName}: allows predefined groups and defined custom groups`,
@@ -4733,26 +4856,6 @@ describe(ruleName, () => {
   })
 
   describe(`${ruleName}: misc`, () => {
-    ruleTester.run(`${ruleName}: allows to use "unsorted" as type`, rule, {
-      valid: [
-        {
-          code: dedent`
-            interface Interface {
-              b: string;
-              c: string;
-              a: string;
-            }
-          `,
-          options: [
-            {
-              type: 'unsorted',
-            },
-          ],
-        },
-      ],
-      invalid: [],
-    })
-
     ruleTester.run(
       `${ruleName}: sets alphabetical asc sorting as default`,
       rule,
diff --git a/test/rules/sort-intersection-types.test.ts b/test/rules/sort-intersection-types.test.ts
index 7cf9fca..f1504af 100644
--- a/test/rules/sort-intersection-types.test.ts
+++ b/test/rules/sort-intersection-types.test.ts
@@ -2319,6 +2319,104 @@ describe(ruleName, () => {
     })
   })
 
+  describe(`${ruleName}: unsorted type`, () => {
+    let type = 'unsorted'
+
+    let options = {
+      type: 'unsorted',
+      order: 'asc',
+    } as const
+
+    ruleTester.run(`${ruleName}(${type}): does not enforce sorting`, rule, {
+      valid: [
+        {
+          code: dedent`
+            type Type =
+              & B
+              & C
+              & A
+          `,
+          options: [options],
+        },
+      ],
+      invalid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces grouping`, rule, {
+      invalid: [
+        {
+          errors: [
+            {
+              data: {
+                leftGroup: 'literal',
+                rightGroup: 'named',
+                left: "'aa'",
+                right: 'ba',
+              },
+              messageId: 'unexpectedIntersectionTypesGroupOrder',
+            },
+          ],
+          output: dedent`
+            type Type =
+              & ba
+              & bb
+              & 'ab'
+              & 'aa'
+          `,
+          code: dedent`
+            type Type =
+              & 'ab'
+              & 'aa'
+              & ba
+              & bb
+          `,
+          options: [
+            {
+              ...options,
+              groups: ['named', 'literal'],
+            },
+          ],
+        },
+      ],
+      valid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces newlines between`, rule, {
+      invalid: [
+        {
+          errors: [
+            {
+              data: {
+                right: "'a'",
+                left: 'b',
+              },
+              messageId: 'missedSpacingBetweenIntersectionTypes',
+            },
+          ],
+          options: [
+            {
+              ...options,
+              groups: ['named', 'literal'],
+              newlinesBetween: 'always',
+            },
+          ],
+          output: dedent`
+            type Type =
+              & b
+
+              & 'a'
+          `,
+          code: dedent`
+            type Type =
+              & b
+              & 'a'
+          `,
+        },
+      ],
+      valid: [],
+    })
+  })
+
   describe(`${ruleName}: misc`, () => {
     ruleTester.run(
       `${ruleName}: sets alphabetical asc sorting as default`,
diff --git a/test/rules/sort-jsx-props.test.ts b/test/rules/sort-jsx-props.test.ts
index 7eddfd5..f8ac3ed 100644
--- a/test/rules/sort-jsx-props.test.ts
+++ b/test/rules/sort-jsx-props.test.ts
@@ -2311,6 +2311,117 @@ describe(ruleName, () => {
     )
   })
 
+  describe(`${ruleName}: unsorted type`, () => {
+    let type = 'unsorted'
+
+    let options = {
+      type: 'unsorted',
+      order: 'asc',
+    } as const
+
+    ruleTester.run(`${ruleName}(${type}): does not enforce sorting`, rule, {
+      valid: [
+        {
+          code: dedent`
+            <Component
+              b
+              c
+              a
+            />
+          `,
+          options: [options],
+        },
+      ],
+      invalid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces grouping`, rule, {
+      invalid: [
+        {
+          errors: [
+            {
+              data: {
+                rightGroup: 'b',
+                leftGroup: 'a',
+                right: 'ba',
+                left: 'aa',
+              },
+              messageId: 'unexpectedJSXPropsGroupOrder',
+            },
+          ],
+          options: [
+            {
+              ...options,
+              customGroups: {
+                a: '^a',
+                b: '^b',
+              },
+              groups: ['b', 'a'],
+            },
+          ],
+          output: dedent`
+            <Component
+              ba
+              bb
+              ab
+              aa
+            />
+          `,
+          code: dedent`
+            <Component
+              ab
+              aa
+              ba
+              bb
+            />
+          `,
+        },
+      ],
+      valid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces newlines between`, rule, {
+      invalid: [
+        {
+          options: [
+            {
+              ...options,
+              customGroups: {
+                a: '^a',
+                b: '^b',
+              },
+              newlinesBetween: 'always',
+              groups: ['b', 'a'],
+            },
+          ],
+          errors: [
+            {
+              data: {
+                right: 'a',
+                left: 'b',
+              },
+              messageId: 'missedSpacingBetweenJSXPropsMembers',
+            },
+          ],
+          output: dedent`
+            <Component
+              b
+
+              a
+            />
+          `,
+          code: dedent`
+            <Component
+              b
+              a
+            />
+          `,
+        },
+      ],
+      valid: [],
+    })
+  })
+
   describe(`${ruleName}: misc`, () => {
     ruleTester.run(
       `${ruleName}: sets alphabetical asc sorting as default`,
diff --git a/test/rules/sort-maps.test.ts b/test/rules/sort-maps.test.ts
index a95e336..8b73a66 100644
--- a/test/rules/sort-maps.test.ts
+++ b/test/rules/sort-maps.test.ts
@@ -2211,6 +2211,129 @@ describe(ruleName, () => {
     )
   })
 
+  describe(`${ruleName}: unsorted type`, () => {
+    let type = 'unsorted'
+
+    let options = {
+      type: 'unsorted',
+      order: 'asc',
+    } as const
+
+    ruleTester.run(`${ruleName}(${type}): does not enforce sorting`, rule, {
+      valid: [
+        {
+          code: dedent`
+            new Map([
+              [b, b],
+              [c, c],
+              [a, a],
+            ])
+          `,
+          options: [options],
+        },
+      ],
+      invalid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces grouping`, rule, {
+      invalid: [
+        {
+          options: [
+            {
+              ...options,
+              customGroups: [
+                {
+                  elementNamePattern: '^a',
+                  groupName: 'a',
+                },
+                {
+                  elementNamePattern: '^b',
+                  groupName: 'b',
+                },
+              ],
+              groups: ['b', 'a'],
+            },
+          ],
+          errors: [
+            {
+              data: {
+                rightGroup: 'b',
+                leftGroup: 'a',
+                right: 'ba',
+                left: 'aa',
+              },
+              messageId: 'unexpectedMapElementsGroupOrder',
+            },
+          ],
+          output: dedent`
+            new Map([
+              [ba, ba],
+              [bb, bb],
+              [ab, ab],
+              [aa, aa],
+            ])
+          `,
+          code: dedent`
+            new Map([
+              [ab, ab],
+              [aa, aa],
+              [ba, ba],
+              [bb, bb],
+            ])
+          `,
+        },
+      ],
+      valid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces newlines between`, rule, {
+      invalid: [
+        {
+          options: [
+            {
+              ...options,
+              customGroups: [
+                {
+                  elementNamePattern: 'a',
+                  groupName: 'a',
+                },
+                {
+                  elementNamePattern: 'b',
+                  groupName: 'b',
+                },
+              ],
+              newlinesBetween: 'always',
+              groups: ['b', 'a'],
+            },
+          ],
+          errors: [
+            {
+              data: {
+                right: 'a',
+                left: 'b',
+              },
+              messageId: 'missedSpacingBetweenMapElementsMembers',
+            },
+          ],
+          output: dedent`
+            new Map([
+              [b, b],
+
+              [a, a],
+            ])
+          `,
+          code: dedent`
+            new Map([
+              [b, b],
+              [a, a],
+            ])
+          `,
+        },
+      ],
+      valid: [],
+    })
+  })
+
   describe(`${ruleName}: misc`, () => {
     ruleTester.run(
       `${ruleName}: sets alphabetical asc sorting as default`,
diff --git a/test/rules/sort-modules.test.ts b/test/rules/sort-modules.test.ts
index 3f05945..c07ff81 100644
--- a/test/rules/sort-modules.test.ts
+++ b/test/rules/sort-modules.test.ts
@@ -3324,6 +3324,149 @@ describe(ruleName, () => {
     )
   })
 
+  describe(`${ruleName}: unsorted type`, () => {
+    let type = 'unsorted'
+
+    let options = {
+      type: 'unsorted',
+      order: 'asc',
+    } as const
+
+    ruleTester.run(`${ruleName}(${type}): does not enforce sorting`, rule, {
+      valid: [
+        {
+          code: dedent`
+            function b() {}
+            function c() {}
+            function a() {}
+          `,
+          options: [options],
+        },
+      ],
+      invalid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces grouping`, rule, {
+      invalid: [
+        {
+          options: [
+            {
+              ...options,
+              customGroups: [
+                {
+                  elementNamePattern: '^a',
+                  groupName: 'a',
+                },
+                {
+                  elementNamePattern: '^b',
+                  groupName: 'b',
+                },
+              ],
+              groups: ['b', 'a'],
+            },
+          ],
+          errors: [
+            {
+              data: {
+                rightGroup: 'b',
+                leftGroup: 'a',
+                right: 'ba',
+                left: 'aa',
+              },
+              messageId: 'unexpectedModulesGroupOrder',
+            },
+          ],
+          output: dedent`
+            function ba() {}
+            function bb() {}
+            function ab() {}
+            function aa() {}
+          `,
+          code: dedent`
+            function ab() {}
+            function aa() {}
+            function ba() {}
+            function bb() {}
+          `,
+        },
+      ],
+      valid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces newlines between`, rule, {
+      invalid: [
+        {
+          options: [
+            {
+              ...options,
+              customGroups: [
+                {
+                  elementNamePattern: 'a',
+                  groupName: 'a',
+                },
+                {
+                  elementNamePattern: 'b',
+                  groupName: 'b',
+                },
+              ],
+              newlinesBetween: 'always',
+              groups: ['b', 'a'],
+            },
+          ],
+          errors: [
+            {
+              data: {
+                right: 'a',
+                left: 'b',
+              },
+              messageId: 'missedSpacingBetweenModulesMembers',
+            },
+          ],
+          output: dedent`
+            function b() {}
+
+            function a() {}
+          `,
+          code: dedent`
+            function b() {}
+            function a() {}
+          `,
+        },
+      ],
+      valid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces dependency sorting`, rule, {
+      invalid: [
+        {
+          errors: [
+            {
+              data: {
+                nodeDependentOnRight: 'A',
+                right: 'B',
+              },
+              messageId: 'unexpectedModulesDependencyOrder',
+            },
+          ],
+          output: dedent`
+            class B {}
+            class A extends B {}
+          `,
+          code: dedent`
+            class A extends B {}
+            class B {}
+          `,
+          options: [
+            {
+              ...options,
+            },
+          ],
+        },
+      ],
+      valid: [],
+    })
+  })
+
   describe(`${ruleName}: misc`, () => {
     ruleTester.run(
       `${ruleName}: sets alphabetical asc sorting as default`,
diff --git a/test/rules/sort-named-exports.test.ts b/test/rules/sort-named-exports.test.ts
index 6cc9bd5..f548d28 100644
--- a/test/rules/sort-named-exports.test.ts
+++ b/test/rules/sort-named-exports.test.ts
@@ -1255,6 +1255,31 @@ describe(ruleName, () => {
     )
   })
 
+  describe(`${ruleName}: unsorted type`, () => {
+    let type = 'unsorted'
+
+    let options = {
+      type: 'unsorted',
+      order: 'asc',
+    } as const
+
+    ruleTester.run(`${ruleName}(${type}): does not enforce sorting`, rule, {
+      valid: [
+        {
+          code: dedent`
+            export {
+              b,
+              c,
+              a,
+            }
+          `,
+          options: [options],
+        },
+      ],
+      invalid: [],
+    })
+  })
+
   describe(`${ruleName}: misc`, () => {
     ruleTester.run(
       `${ruleName}: sets alphabetical asc sorting as default`,
diff --git a/test/rules/sort-named-imports.test.ts b/test/rules/sort-named-imports.test.ts
index 33b85f7..2726d7b 100644
--- a/test/rules/sort-named-imports.test.ts
+++ b/test/rules/sort-named-imports.test.ts
@@ -1799,6 +1799,31 @@ describe(ruleName, () => {
     )
   })
 
+  describe(`${ruleName}: unsorted type`, () => {
+    let type = 'unsorted'
+
+    let options = {
+      type: 'unsorted',
+      order: 'asc',
+    } as const
+
+    ruleTester.run(`${ruleName}(${type}): does not enforce sorting`, rule, {
+      valid: [
+        {
+          code: dedent`
+            import {
+              b,
+              c,
+              a,
+            } from 'module'
+          `,
+          options: [options],
+        },
+      ],
+      invalid: [],
+    })
+  })
+
   describe(`${ruleName}: misc`, () => {
     ruleTester.run(
       `${ruleName}: sets alphabetical asc sorting as default`,
diff --git a/test/rules/sort-object-types.test.ts b/test/rules/sort-object-types.test.ts
index 32be6f3..27ead78 100644
--- a/test/rules/sort-object-types.test.ts
+++ b/test/rules/sort-object-types.test.ts
@@ -3983,6 +3983,129 @@ describe(ruleName, () => {
     )
   })
 
+  describe(`${ruleName}: unsorted type`, () => {
+    let type = 'unsorted'
+
+    let options = {
+      type: 'unsorted',
+      order: 'asc',
+    } as const
+
+    ruleTester.run(`${ruleName}(${type}): does not enforce sorting`, rule, {
+      valid: [
+        {
+          code: dedent`
+            type Type = {
+              b: string;
+              c: string;
+              a: string;
+            }
+          `,
+          options: [options],
+        },
+      ],
+      invalid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces grouping`, rule, {
+      invalid: [
+        {
+          options: [
+            {
+              ...options,
+              customGroups: [
+                {
+                  elementNamePattern: '^a',
+                  groupName: 'a',
+                },
+                {
+                  elementNamePattern: '^b',
+                  groupName: 'b',
+                },
+              ],
+              groups: ['b', 'a'],
+            },
+          ],
+          errors: [
+            {
+              data: {
+                rightGroup: 'b',
+                leftGroup: 'a',
+                right: 'ba',
+                left: 'aa',
+              },
+              messageId: 'unexpectedObjectTypesGroupOrder',
+            },
+          ],
+          output: dedent`
+            type Type = {
+              ba: string
+              bb: string
+              ab: string
+              aa: string
+            }
+          `,
+          code: dedent`
+            type Type = {
+              ab: string
+              aa: string
+              ba: string
+              bb: string
+            }
+          `,
+        },
+      ],
+      valid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces newlines between`, rule, {
+      invalid: [
+        {
+          options: [
+            {
+              ...options,
+              customGroups: [
+                {
+                  elementNamePattern: 'a',
+                  groupName: 'a',
+                },
+                {
+                  elementNamePattern: 'b',
+                  groupName: 'b',
+                },
+              ],
+              newlinesBetween: 'always',
+              groups: ['b', 'a'],
+            },
+          ],
+          errors: [
+            {
+              data: {
+                right: 'a',
+                left: 'b',
+              },
+              messageId: 'missedSpacingBetweenObjectTypeMembers',
+            },
+          ],
+          output: dedent`
+            type Type = {
+              b: string
+
+              a: string
+            }
+          `,
+          code: dedent`
+            type Type = {
+              b: string
+              a: string
+            }
+          `,
+        },
+      ],
+      valid: [],
+    })
+  })
+
   describe(`${ruleName}: validating group configuration`, () => {
     ruleTester.run(
       `${ruleName}: allows predefined groups and defined custom groups`,
@@ -4013,26 +4136,6 @@ describe(ruleName, () => {
   })
 
   describe('misc', () => {
-    ruleTester.run(`${ruleName}: allows to use "unsorted" as type`, rule, {
-      valid: [
-        {
-          code: dedent`
-            type Type = {
-              b: string;
-              c: string;
-              a: string;
-            }
-          `,
-          options: [
-            {
-              type: 'unsorted',
-            },
-          ],
-        },
-      ],
-      invalid: [],
-    })
-
     ruleTester.run(`${ruleName}: ignores semi at the end of value`, rule, {
       valid: [
         dedent`
diff --git a/test/rules/sort-objects.test.ts b/test/rules/sort-objects.test.ts
index e9ae541..e65176f 100644
--- a/test/rules/sort-objects.test.ts
+++ b/test/rules/sort-objects.test.ts
@@ -5124,27 +5124,168 @@ describe(ruleName, () => {
     )
   })
 
-  describe(`${ruleName}: misc`, () => {
-    ruleTester.run(`${ruleName}: allows to use "unsorted" as type`, rule, {
+  describe(`${ruleName}: unsorted type`, () => {
+    let type = 'unsorted'
+
+    let options = {
+      type: 'unsorted',
+      order: 'asc',
+    } as const
+
+    ruleTester.run(`${ruleName}(${type}): does not enforce sorting`, rule, {
       valid: [
         {
           code: dedent`
             let obj = {
               b: 'b',
               c: 'c',
-              a: 'a'
+              a: 'a',
             }
           `,
+          options: [options],
+        },
+      ],
+      invalid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces grouping`, rule, {
+      invalid: [
+        {
           options: [
             {
-              type: 'unsorted',
+              ...options,
+              customGroups: [
+                {
+                  elementNamePattern: '^a',
+                  groupName: 'a',
+                },
+                {
+                  elementNamePattern: '^b',
+                  groupName: 'b',
+                },
+              ],
+              groups: ['b', 'a'],
+            },
+          ],
+          errors: [
+            {
+              data: {
+                rightGroup: 'b',
+                leftGroup: 'a',
+                right: 'ba',
+                left: 'aa',
+              },
+              messageId: 'unexpectedObjectsGroupOrder',
             },
           ],
+          output: dedent`
+            let obj = {
+              ba: 'ba',
+              bb: 'bb',
+              ab: 'ab',
+              aa: 'aa',
+            }
+          `,
+          code: dedent`
+            let obj = {
+              ab: 'ab',
+              aa: 'aa',
+              ba: 'ba',
+              bb: 'bb',
+            }
+          `,
         },
       ],
-      invalid: [],
+      valid: [],
     })
 
+    ruleTester.run(`${ruleName}(${type}): enforces newlines between`, rule, {
+      invalid: [
+        {
+          options: [
+            {
+              ...options,
+              customGroups: [
+                {
+                  elementNamePattern: 'a',
+                  groupName: 'a',
+                },
+                {
+                  elementNamePattern: 'b',
+                  groupName: 'b',
+                },
+              ],
+              newlinesBetween: 'always',
+              groups: ['b', 'a'],
+            },
+          ],
+          errors: [
+            {
+              data: {
+                right: 'a',
+                left: 'b',
+              },
+              messageId: 'missedSpacingBetweenObjectMembers',
+            },
+          ],
+          output: dedent`
+            let obj = {
+              b: 'b',
+
+              a: 'a',
+            }
+          `,
+          code: dedent`
+            let obj = {
+              b: 'b',
+              a: 'a',
+            }
+          `,
+        },
+      ],
+      valid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces dependency sorting`, rule, {
+      invalid: [
+        {
+          errors: [
+            {
+              data: {
+                nodeDependentOnRight: 'a',
+                right: 'b',
+              },
+              messageId: 'unexpectedObjectsDependencyOrder',
+            },
+          ],
+          output: dedent`
+            let Func = ({
+              b,
+              a = b,
+            }) => {
+              // ...
+            }
+          `,
+          code: dedent`
+            let Func = ({
+              a = b,
+              b,
+            }) => {
+              // ...
+            }
+          `,
+          options: [
+            {
+              ...options,
+            },
+          ],
+        },
+      ],
+      valid: [],
+    })
+  })
+
+  describe(`${ruleName}: misc`, () => {
     ruleTester.run(
       `${ruleName}: sets alphabetical asc sorting as default`,
       rule,
diff --git a/test/rules/sort-sets.test.ts b/test/rules/sort-sets.test.ts
index b17963f..6bc8f94 100644
--- a/test/rules/sort-sets.test.ts
+++ b/test/rules/sort-sets.test.ts
@@ -2532,6 +2532,129 @@ describe(ruleName, () => {
     )
   })
 
+  describe(`${ruleName}: unsorted type`, () => {
+    let type = 'unsorted'
+
+    let options = {
+      type: 'unsorted',
+      order: 'asc',
+    } as const
+
+    ruleTester.run(`${ruleName}(${type}): does not enforce sorting`, rule, {
+      valid: [
+        {
+          code: dedent`
+            new Set([
+              'b',
+              'c',
+              'a'
+            ])
+          `,
+          options: [options],
+        },
+      ],
+      invalid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces grouping`, rule, {
+      invalid: [
+        {
+          options: [
+            {
+              ...options,
+              customGroups: [
+                {
+                  elementNamePattern: '^a',
+                  groupName: 'a',
+                },
+                {
+                  elementNamePattern: '^b',
+                  groupName: 'b',
+                },
+              ],
+              groups: ['b', 'a'],
+            },
+          ],
+          errors: [
+            {
+              data: {
+                rightGroup: 'b',
+                leftGroup: 'a',
+                right: 'ba',
+                left: 'aa',
+              },
+              messageId: 'unexpectedSetsGroupOrder',
+            },
+          ],
+          output: dedent`
+            new Set([
+              'ba',
+              'bb',
+              'ab',
+              'aa',
+            ])
+          `,
+          code: dedent`
+            new Set([
+              'ab',
+              'aa',
+              'ba',
+              'bb',
+            ])
+          `,
+        },
+      ],
+      valid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces newlines between`, rule, {
+      invalid: [
+        {
+          options: [
+            {
+              ...options,
+              customGroups: [
+                {
+                  elementNamePattern: 'a',
+                  groupName: 'a',
+                },
+                {
+                  elementNamePattern: 'b',
+                  groupName: 'b',
+                },
+              ],
+              newlinesBetween: 'always',
+              groups: ['b', 'a'],
+            },
+          ],
+          errors: [
+            {
+              data: {
+                right: 'a',
+                left: 'b',
+              },
+              messageId: 'missedSpacingBetweenSetsMembers',
+            },
+          ],
+          output: dedent`
+            new Set([
+              'b',
+
+              'a',
+            ])
+          `,
+          code: dedent`
+            new Set([
+              'b',
+              'a',
+            ])
+          `,
+        },
+      ],
+      valid: [],
+    })
+  })
+
   describe(`${ruleName}: misc`, () => {
     ruleTester.run(
       `${ruleName}: sets alphabetical asc sorting as default`,
diff --git a/test/rules/sort-switch-case.test.ts b/test/rules/sort-switch-case.test.ts
index 1ea0988..6193462 100644
--- a/test/rules/sort-switch-case.test.ts
+++ b/test/rules/sort-switch-case.test.ts
@@ -2680,6 +2680,45 @@ describe(ruleName, () => {
     )
   })
 
+  describe(`${ruleName}: unsorted type`, () => {
+    let type = 'unsorted'
+
+    let options = {
+      type: 'unsorted',
+      order: 'asc',
+    } as const
+
+    ruleTester.run(`${ruleName}(${type}): does not enforce sorting`, rule, {
+      valid: [
+        {
+          code: dedent`
+            switch (x) {
+              case 'b':
+                break;
+              case 'c':
+                break;
+              case 'a':
+                break;
+            }
+          `,
+          options: [options],
+        },
+        {
+          code: dedent`
+            switch (x) {
+              case 'b':
+              case 'c':
+              case 'a':
+                break;
+            }
+          `,
+          options: [options],
+        },
+      ],
+      invalid: [],
+    })
+  })
+
   describe(`${ruleName}: misc`, () => {
     ruleTester.run(`${ruleName}: not works if discriminant is true`, rule, {
       valid: [
diff --git a/test/rules/sort-union-types.test.ts b/test/rules/sort-union-types.test.ts
index 78ac0fa..e13d4b6 100644
--- a/test/rules/sort-union-types.test.ts
+++ b/test/rules/sort-union-types.test.ts
@@ -2351,6 +2351,104 @@ describe(ruleName, () => {
     })
   })
 
+  describe(`${ruleName}: unsorted type`, () => {
+    let type = 'unsorted'
+
+    let options = {
+      type: 'unsorted',
+      order: 'asc',
+    } as const
+
+    ruleTester.run(`${ruleName}(${type}): does not enforce sorting`, rule, {
+      valid: [
+        {
+          code: dedent`
+            type Type =
+              | B
+              | C
+              | A
+          `,
+          options: [options],
+        },
+      ],
+      invalid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces grouping`, rule, {
+      invalid: [
+        {
+          errors: [
+            {
+              data: {
+                leftGroup: 'literal',
+                rightGroup: 'named',
+                left: "'aa'",
+                right: 'ba',
+              },
+              messageId: 'unexpectedUnionTypesGroupOrder',
+            },
+          ],
+          output: dedent`
+            type Type =
+              | ba
+              | bb
+              | 'ab'
+              | 'aa'
+          `,
+          code: dedent`
+            type Type =
+              | 'ab'
+              | 'aa'
+              | ba
+              | bb
+          `,
+          options: [
+            {
+              ...options,
+              groups: ['named', 'literal'],
+            },
+          ],
+        },
+      ],
+      valid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces newlines between`, rule, {
+      invalid: [
+        {
+          errors: [
+            {
+              data: {
+                right: "'a'",
+                left: 'b',
+              },
+              messageId: 'missedSpacingBetweenUnionTypes',
+            },
+          ],
+          options: [
+            {
+              ...options,
+              groups: ['named', 'literal'],
+              newlinesBetween: 'always',
+            },
+          ],
+          output: dedent`
+            type Type =
+              | b
+
+              | 'a'
+          `,
+          code: dedent`
+            type Type =
+              | b
+              | 'a'
+          `,
+        },
+      ],
+      valid: [],
+    })
+  })
+
   describe(`${ruleName}: misc`, () => {
     ruleTester.run(
       `${ruleName}: sets alphabetical asc sorting as default`,
diff --git a/test/rules/sort-variable-declarations.test.ts b/test/rules/sort-variable-declarations.test.ts
index 30919a9..495f8ff 100644
--- a/test/rules/sort-variable-declarations.test.ts
+++ b/test/rules/sort-variable-declarations.test.ts
@@ -1712,6 +1712,62 @@ describe(ruleName, () => {
     )
   })
 
+  describe(`${ruleName}: unsorted type`, () => {
+    let type = 'unsorted'
+
+    let options = {
+      type: 'unsorted',
+      order: 'asc',
+    } as const
+
+    ruleTester.run(`${ruleName}(${type}): does not enforce sorting`, rule, {
+      valid: [
+        {
+          code: dedent`
+            let
+              b,
+              c,
+              a,
+          `,
+          options: [options],
+        },
+      ],
+      invalid: [],
+    })
+
+    ruleTester.run(`${ruleName}(${type}): enforces dependency sorting`, rule, {
+      invalid: [
+        {
+          errors: [
+            {
+              data: {
+                nodeDependentOnRight: 'a',
+                right: 'b',
+              },
+              messageId: 'unexpectedVariableDeclarationsDependencyOrder',
+            },
+          ],
+          output: dedent`
+            let
+              b = 1,
+              a = b,
+          `,
+          code: dedent`
+            let
+              a = b,
+              b = 1,
+          `,
+          options: [
+            {
+              ...options,
+            },
+          ],
+        },
+      ],
+      valid: [],
+    })
+  })
+
   describe(`${ruleName}: misc`, () => {
     let eslintDisableRuleTesterName = `${ruleName}: supports 'eslint-disable' for individual nodes`
     ruleTester.run(eslintDisableRuleTesterName, rule, {
diff --git a/test/utils/compare.test.ts b/test/utils/compare.test.ts
index 6860d28..e4d5a31 100644
--- a/test/utils/compare.test.ts
+++ b/test/utils/compare.test.ts
@@ -270,6 +270,25 @@ describe('compare', () => {
     })
   })
 
+  describe('unsorted', () => {
+    let compareOptions = {
+      fallbackSort: { type: 'unsorted' } as const,
+      specialCharacters: 'keep' as const,
+      type: 'unsorted' as const,
+      locales: 'en-US' as const,
+      order: 'desc' as const,
+      ignoreCase: false,
+    }
+
+    it('does not sort', () => {
+      expect(
+        compare(createTestNode({ name: 'b' }), createTestNode({ name: 'a' }), {
+          ...compareOptions,
+        }),
+      ).toBe(0)
+    })
+  })
+
   describe('fallback sorting', () => {
     let compareOptions = {
       specialCharacters: 'keep' as const,