Skip to content

Commit

Permalink
docs: adds missing documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
hugop95 committed Jan 13, 2025
1 parent f49db3b commit 6a25ad5
Show file tree
Hide file tree
Showing 6 changed files with 137 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/content/rules/sort-classes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,10 @@ Specifies how new lines should be handled between class member groups.
- `always` — Enforce one new line between each group, and forbid new lines inside a group.
- `never` — No new lines are allowed in object types.

You can also enforce the newline behavior between two specific groups through the `groups` options.

See the [`groups`](#newlines-between-groups) option.

This option is only applicable when `partitionByNewLine` is `false`.

### ignoreCallbackDependenciesPatterns
Expand Down Expand Up @@ -556,6 +560,25 @@ abstract class Example extends BaseExample {
}
```

#### Newlines between groups

You may place `newlinesBetween` objects between your groups to enforce the newline behavior between two specific groups.

See the [`newlinesBetween`](#newlinesbetween) option.

This feature is only applicable when `partitionByNewLine` is false.

```ts
{
newlinesBetween: 'always',
groups: [
'a',
{ newlinesBetween: 'never' }, // Overrides the global newlinesBetween option
'b',
]
}
```

### customGroups

<Important title="Migrating from the old API">
Expand Down
23 changes: 23 additions & 0 deletions docs/content/rules/sort-interfaces.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@ Specifies how new lines should be handled between interface groups.
- `always` — Enforce one new line between each group, and forbid new lines inside a group.
- `never` — No new lines are allowed between interface members.

You can also enforce the newline behavior between two specific groups through the `groups` options.

See the [`groups`](#newlines-between-groups) option.

This option is only applicable when `partitionByNewLine` is `false`.

### [DEPRECATED] groupKind
Expand Down Expand Up @@ -433,6 +437,25 @@ interface Interface {
method(): string
```
#### Newlines between groups
You may place `newlinesBetween` objects between your groups to enforce the newline behavior between two specific groups.
See the [`newlinesBetween`](#newlinesbetween) option.
This feature is only applicable when `partitionByNewLine` is false.
```ts
{
newlinesBetween: 'always',
groups: [
'a',
{ newlinesBetween: 'never' }, // Overrides the global newlinesBetween option
'b',
]
}
```
### customGroups
<Important title="Migrating from the old API">
Expand Down
23 changes: 23 additions & 0 deletions docs/content/rules/sort-intersection-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ Specifies how new lines should be handled between intersection type groups.
- `always` — Enforce one new line between each group, and forbid new lines inside a group.
- `never` — No new lines are allowed in intersection types.
You can also enforce the newline behavior between two specific groups through the `groups` options.
See the [`groups`](#newlines-between-groups) option.
This option is only applicable when `partitionByNewLine` is `false`.
### groups
Expand Down Expand Up @@ -296,6 +300,25 @@ type Example =
}
```

#### Newlines between groups

You may place `newlinesBetween` objects between your groups to enforce the newline behavior between two specific groups.

See the [`newlinesBetween`](#newlinesbetween) option.

This feature is only applicable when `partitionByNewLine` is false.

```ts
{
newlinesBetween: 'always',
groups: [
'a',
{ newlinesBetween: 'never' }, // Overrides the global newlinesBetween option
'b',
]
}
```

## Usage

<CodeTabs
Expand Down
22 changes: 22 additions & 0 deletions docs/content/rules/sort-modules.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ Specifies how new lines should be handled between module member groups.
- `always` — Enforce one new line between each group, and forbid new lines inside a group.
- `never` — No new lines are allowed in object types.

You can also enforce the newline behavior between two specific groups through the `groups` options.

See the [`groups`](#newlines-between-groups) option.

This option is only applicable when `partitionByNewLine` is `false`.

### groups
Expand Down Expand Up @@ -496,6 +500,24 @@ Example:
}
```

#### Newlines between groups

You may place `newlinesBetween` objects between your groups to enforce the newline behavior between two specific groups.

See the [`newlinesBetween`](#newlinesbetween) option.

This feature is only applicable when `partitionByNewLine` is false.

```ts
{
newlinesBetween: 'always',
groups: [
'a',
{ newlinesBetween: 'never' }, // Overrides the global newlinesBetween option
'b',
]
}
```

## Usage

Expand Down
23 changes: 23 additions & 0 deletions docs/content/rules/sort-object-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ Specifies how new lines should be handled between object type groups.
- `always` — Enforce one new line between each group, and forbid new lines inside a group.
- `never` — No new lines are allowed in object types.

You can also enforce the newline behavior between two specific groups through the `groups` options.

See the [`groups`](#newlines-between-groups) option.

This option is only applicable when `partitionByNewLine` is `false`.

### [DEPRECATED] groupKind
Expand Down Expand Up @@ -529,6 +533,25 @@ type User = {
}
```
#### Newlines between groups
You may place `newlinesBetween` objects between your groups to enforce the newline behavior between two specific groups.
See the [`newlinesBetween`](#newlinesbetween) option.
This feature is only applicable when `partitionByNewLine` is false.
```ts
{
newlinesBetween: 'always',
groups: [
'a',
{ newlinesBetween: 'never' }, // Overrides the global newlinesBetween option
'b',
]
}
```
## Usage
<CodeTabs
Expand Down
23 changes: 23 additions & 0 deletions docs/content/rules/sort-union-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ Specifies how new lines should be handled between union type groups.
- `always` — Enforce one new line between each group, and forbid new lines inside a group.
- `never` — No new lines are allowed in union types.
You can also enforce the newline behavior between two specific groups through the `groups` options.
See the [`groups`](#newlines-between-groups) option.
This option is only applicable when `partitionByNewLine` is `false`.
### groups
Expand Down Expand Up @@ -316,6 +320,25 @@ type Example =
}
```

#### Newlines between groups

You may place `newlinesBetween` objects between your groups to enforce the newline behavior between two specific groups.

See the [`newlinesBetween`](#newlinesbetween) option.

This feature is only applicable when `partitionByNewLine` is false.

```ts
{
newlinesBetween: 'always',
groups: [
'a',
{ newlinesBetween: 'never' }, // Overrides the global newlinesBetween option
'b',
]
}
```

## Usage

<CodeTabs
Expand Down

0 comments on commit 6a25ad5

Please sign in to comment.