Skip to content

Commit ae36860

Browse files
authored
feat: add new lines between to settings
1 parent 068014b commit ae36860

22 files changed

+31
-34
lines changed

docs/content/guide/getting-started.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,16 @@ The highest priority is given to the settings of a particular rule. Next comes t
140140

141141
In settings, you can set the following options:
142142

143-
- `type` — The type of sorting. Possible values are `'alphabetical'`, `'natural'`, `'line-length'` and `custom`.
143+
- `type` — The type of sorting. Possible values are `'alphabetical'`, `'natural'`, `'line-length'`, `'custom'` or `'unsorted'`.
144144
- `order` — The order of sorting. Possible values are `'asc'` and `'desc'`.
145145
- `fallbackSort` — The fallback sorting type and order to use when two elements are equal.
146-
- `alphabet` — The custom alphabet to use when `type` is `custom`.
146+
- `alphabet` — The custom alphabet to use when `type` is `'custom'`.
147147
- `ignoreCase` — Ignore case when sorting.
148148
- `specialCharacters` — Control whether special characters should be kept, trimmed or removed before sorting. Values can be `'keep'`, `'trim'` or `'remove'`.
149149
- `locales` - The locales of sorting. Values can be a string with a BCP 47 language tag, or an array of such strings. See [String.prototype.localeCompare() - locales](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare#locales).
150150
- `partitionByComment` — Partition the sorted elements by comments. Values can be `true`, `false` or regexp pattern.
151151
- `partitionByNewLine` — Partition the sorted elements by newlines. Values can be `true` or `false`.
152+
- `newlinesBetween` — Specifies how to handle newlines between groups. Values can be `'ignore'` or a number.
152153

153154
Example:
154155

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ An array element will match a `CustomGroupAnyOfDefinition` group if it matches a
435435
- `groupName` — The group's name, which needs to be put in the [`groups`](#groups) option.
436436
- `selector` — Filter on the `selector` of the element.
437437
- `elementNamePattern` — If entered, will check that the name of the element matches the pattern entered.
438-
- `type` — Overrides the [`type`](#type) option for that custom group. `unsorted` will not sort the group.
438+
- `type` — Overrides the [`type`](#type) option for that custom group. `'unsorted'` will not sort the group.
439439
- `order` — Overrides the [`order`](#order) option for that custom group.
440440
- `fallbackSort` — Overrides the [`fallbackSort`](#fallbacksort) option for that custom group.
441441
- `newlinesInside` — Enforces a specific newline behavior between elements of the group.

docs/content/rules/sort-classes.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ A class member will match a `CustomGroupAnyOfDefinition` group if it matches all
723723
- `elementNamePattern` — If entered, will check that the name of the element matches the pattern entered.
724724
- `elementValuePattern` — Only for non-function properties. If entered, will check that the value of the property matches the pattern entered.
725725
- `decoratorNamePattern` — If entered, will check that at least one `decorator` matches the pattern entered.
726-
- `type` — Overrides the [`type`](#type) option for that custom group. `unsorted` will not sort the group.
726+
- `type` — Overrides the [`type`](#type) option for that custom group. `'unsorted'` will not sort the group.
727727
- `order` — Overrides the [`order`](#order) option for that custom group.
728728
- `fallbackSort` — Overrides the [`fallbackSort`](#fallbacksort) option for that custom group.
729729
- `newlinesInside` — Enforces a specific newline behavior between elements of the group.

docs/content/rules/sort-decorators.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ A declaration will match a `CustomGroupAnyOfDefinition` group if it matches all
412412

413413
- `groupName` — The group's name, which needs to be put in the [`groups`](#groups) option.
414414
- `elementNamePattern` — If entered, will check that the name of the element matches the pattern entered.
415-
- `type` — Overrides the [`type`](#type) option for that custom group. `unsorted` will not sort the group.
415+
- `type` — Overrides the [`type`](#type) option for that custom group. `'unsorted'` will not sort the group.
416416
- `order` — Overrides the [`order`](#order) option for that custom group.
417417
- `fallbackSort` — Overrides the [`fallbackSort`](#fallbacksort) option for that custom group.
418418
- `newlinesInside` — Enforces a specific newline behavior between elements of the group.

docs/content/rules/sort-enums.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ An enum member will match a `CustomGroupAnyOfDefinition` group if it matches all
341341
- `groupName` — The group's name, which needs to be put in the [`groups`](#groups) option.
342342
- `elementNamePattern` — If entered, will check that the name of the element matches the pattern entered.
343343
- `elementValuePattern` — If entered, will check that the value of the element matches the pattern entered.
344-
- `type` — Overrides the [`type`](#type) option for that custom group. `unsorted` will not sort the group.
344+
- `type` — Overrides the [`type`](#type) option for that custom group. `'unsorted'` will not sort the group.
345345
- `order` — Overrides the [`order`](#order) option for that custom group.
346346
- `fallbackSort` — Overrides the [`fallbackSort`](#fallbacksort) option for that custom group.
347347
- `newlinesInside` — Enforces a specific newline behavior between elements of the group.

docs/content/rules/sort-exports.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ An export will match a `CustomGroupAnyOfDefinition` group if it matches all the
357357
- `groupName` — The group's name, which needs to be put in the [`groups`](#groups) option.
358358
- `selector` — Filter on the `selector` of the element.
359359
- `elementNamePattern` — If entered, will check that the name of the element matches the pattern entered.
360-
- `type` — Overrides the [`type`](#type) option for that custom group. `unsorted` will not sort the group.
360+
- `type` — Overrides the [`type`](#type) option for that custom group. `'unsorted'` will not sort the group.
361361
- `order` — Overrides the [`order`](#order) option for that custom group.
362362
- `fallbackSort` — Overrides the [`fallbackSort`](#fallbacksort) option for that custom group.
363363
- `newlinesInside` — Enforces a specific newline behavior between elements of the group.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ A declaration will match a `CustomGroupAnyOfDefinition` group if it matches all
325325

326326
- `groupName` — The group's name, which needs to be put in the [`groups`](#groups) option.
327327
- `elementNamePattern` — If entered, will check that the name of the element matches the pattern entered.
328-
- `type` — Overrides the [`type`](#type) option for that custom group. `unsorted` will not sort the group.
328+
- `type` — Overrides the [`type`](#type) option for that custom group. `'unsorted'` will not sort the group.
329329
- `order` — Overrides the [`order`](#order) option for that custom group.
330330
- `fallbackSort` — Overrides the [`fallbackSort`](#fallbacksort) option for that custom group.
331331
- `newlinesInside` — Enforces a specific newline behavior between elements of the group.

docs/content/rules/sort-imports.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ An import will match a `CustomGroupAnyOfDefinition` group if it matches all the
616616
- `selector` — Filter on the `selector` of the element.
617617
- `modifiers` — Filter on the `modifiers` of the element. (All the modifiers of the element must be present in that list)
618618
- `elementNamePattern` — If entered, will check that the name of the element matches the pattern entered.
619-
- `type` — Overrides the [`type`](#type) option for that custom group. `unsorted` will not sort the group.
619+
- `type` — Overrides the [`type`](#type) option for that custom group. `'unsorted'` will not sort the group.
620620
- `order` — Overrides the [`order`](#order) option for that custom group.
621621
- `fallbackSort` — Overrides the [`fallbackSort`](#fallbacksort) option for that custom group.
622622
- `newlinesInside` — Enforces a specific newline behavior between elements of the group.

docs/content/rules/sort-interfaces.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ An interface member will match a `CustomGroupAnyOfDefinition` group if it matche
677677
- `modifiers` — Filter on the `modifiers` of the element. (All the modifiers of the element must be present in that list)
678678
- `elementNamePattern` — If entered, will check that the name of the element matches the pattern entered.
679679
- `elementValuePattern` — Only for properties. If entered, will check that the value of the property matches the pattern entered.
680-
- `type` — Overrides the [`type`](#type) option for that custom group. `unsorted` will not sort the group.
680+
- `type` — Overrides the [`type`](#type) option for that custom group. `'unsorted'` will not sort the group.
681681
- `order` — Overrides the [`order`](#order) option for that custom group.
682682
- `fallbackSort` — Overrides the [`fallbackSort`](#fallbacksort) option for that custom group.
683683
- `sortBy` — Overrides the `sortBy` option for that custom group

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ An type member will match a `CustomGroupAnyOfDefinition` group if it matches all
426426
- `groupName`The group's name, which needs to be put in the [`groups`](#groups) option.
427427
- `selector`Filter on the `selector` of the element.
428428
- `elementNamePattern`If entered, will check that the name of the element matches the pattern entered.
429-
- `type`Overrides the [`type`](#type) option for that custom group. `unsorted` will not sort the group.
429+
- `type`Overrides the [`type`](#type) option for that custom group. `'unsorted'` will not sort the group.
430430
- `order`Overrides the [`order`](#order) option for that custom group.
431431
- `fallbackSort`Overrides the [`fallbackSort`](#fallbacksort) option for that custom group.
432432
- `newlinesInside`Enforces a specific newline behavior between elements of the group.

0 commit comments

Comments
 (0)