Skip to content

Commit 6a25ad5

Browse files
committed
docs: adds missing documentation
1 parent f49db3b commit 6a25ad5

6 files changed

+137
-0
lines changed

docs/content/rules/sort-classes.mdx

+23
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,10 @@ Specifies how new lines should be handled between class member groups.
266266
- `always` — Enforce one new line between each group, and forbid new lines inside a group.
267267
- `never` — No new lines are allowed in object types.
268268

269+
You can also enforce the newline behavior between two specific groups through the `groups` options.
270+
271+
See the [`groups`](#newlines-between-groups) option.
272+
269273
This option is only applicable when `partitionByNewLine` is `false`.
270274

271275
### ignoreCallbackDependenciesPatterns
@@ -556,6 +560,25 @@ abstract class Example extends BaseExample {
556560
}
557561
```
558562

563+
#### Newlines between groups
564+
565+
You may place `newlinesBetween` objects between your groups to enforce the newline behavior between two specific groups.
566+
567+
See the [`newlinesBetween`](#newlinesbetween) option.
568+
569+
This feature is only applicable when `partitionByNewLine` is false.
570+
571+
```ts
572+
{
573+
newlinesBetween: 'always',
574+
groups: [
575+
'a',
576+
{ newlinesBetween: 'never' }, // Overrides the global newlinesBetween option
577+
'b',
578+
]
579+
}
580+
```
581+
559582
### customGroups
560583

561584
<Important title="Migrating from the old API">

docs/content/rules/sort-interfaces.mdx

+23
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,10 @@ Specifies how new lines should be handled between interface groups.
248248
- `always` — Enforce one new line between each group, and forbid new lines inside a group.
249249
- `never` — No new lines are allowed between interface members.
250250

251+
You can also enforce the newline behavior between two specific groups through the `groups` options.
252+
253+
See the [`groups`](#newlines-between-groups) option.
254+
251255
This option is only applicable when `partitionByNewLine` is `false`.
252256

253257
### [DEPRECATED] groupKind
@@ -433,6 +437,25 @@ interface Interface {
433437
method(): string
434438
```
435439
440+
#### Newlines between groups
441+
442+
You may place `newlinesBetween` objects between your groups to enforce the newline behavior between two specific groups.
443+
444+
See the [`newlinesBetween`](#newlinesbetween) option.
445+
446+
This feature is only applicable when `partitionByNewLine` is false.
447+
448+
```ts
449+
{
450+
newlinesBetween: 'always',
451+
groups: [
452+
'a',
453+
{ newlinesBetween: 'never' }, // Overrides the global newlinesBetween option
454+
'b',
455+
]
456+
}
457+
```
458+
436459
### customGroups
437460
438461
<Important title="Migrating from the old API">

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

+23
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ Specifies how new lines should be handled between intersection type groups.
176176
- `always` — Enforce one new line between each group, and forbid new lines inside a group.
177177
- `never` — No new lines are allowed in intersection types.
178178
179+
You can also enforce the newline behavior between two specific groups through the `groups` options.
180+
181+
See the [`groups`](#newlines-between-groups) option.
182+
179183
This option is only applicable when `partitionByNewLine` is `false`.
180184
181185
### groups
@@ -296,6 +300,25 @@ type Example =
296300
}
297301
```
298302

303+
#### Newlines between groups
304+
305+
You may place `newlinesBetween` objects between your groups to enforce the newline behavior between two specific groups.
306+
307+
See the [`newlinesBetween`](#newlinesbetween) option.
308+
309+
This feature is only applicable when `partitionByNewLine` is false.
310+
311+
```ts
312+
{
313+
newlinesBetween: 'always',
314+
groups: [
315+
'a',
316+
{ newlinesBetween: 'never' }, // Overrides the global newlinesBetween option
317+
'b',
318+
]
319+
}
320+
```
321+
299322
## Usage
300323

301324
<CodeTabs

docs/content/rules/sort-modules.mdx

+22
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,10 @@ Specifies how new lines should be handled between module member groups.
290290
- `always` — Enforce one new line between each group, and forbid new lines inside a group.
291291
- `never` — No new lines are allowed in object types.
292292

293+
You can also enforce the newline behavior between two specific groups through the `groups` options.
294+
295+
See the [`groups`](#newlines-between-groups) option.
296+
293297
This option is only applicable when `partitionByNewLine` is `false`.
294298

295299
### groups
@@ -496,6 +500,24 @@ Example:
496500
}
497501
```
498502

503+
#### Newlines between groups
504+
505+
You may place `newlinesBetween` objects between your groups to enforce the newline behavior between two specific groups.
506+
507+
See the [`newlinesBetween`](#newlinesbetween) option.
508+
509+
This feature is only applicable when `partitionByNewLine` is false.
510+
511+
```ts
512+
{
513+
newlinesBetween: 'always',
514+
groups: [
515+
'a',
516+
{ newlinesBetween: 'never' }, // Overrides the global newlinesBetween option
517+
'b',
518+
]
519+
}
520+
```
499521

500522
## Usage
501523

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

+23
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@ Specifies how new lines should be handled between object type groups.
213213
- `always` — Enforce one new line between each group, and forbid new lines inside a group.
214214
- `never` — No new lines are allowed in object types.
215215

216+
You can also enforce the newline behavior between two specific groups through the `groups` options.
217+
218+
See the [`groups`](#newlines-between-groups) option.
219+
216220
This option is only applicable when `partitionByNewLine` is `false`.
217221

218222
### [DEPRECATED] groupKind
@@ -529,6 +533,25 @@ type User = {
529533
}
530534
```
531535
536+
#### Newlines between groups
537+
538+
You may place `newlinesBetween` objects between your groups to enforce the newline behavior between two specific groups.
539+
540+
See the [`newlinesBetween`](#newlinesbetween) option.
541+
542+
This feature is only applicable when `partitionByNewLine` is false.
543+
544+
```ts
545+
{
546+
newlinesBetween: 'always',
547+
groups: [
548+
'a',
549+
{ newlinesBetween: 'never' }, // Overrides the global newlinesBetween option
550+
'b',
551+
]
552+
}
553+
```
554+
532555
## Usage
533556
534557
<CodeTabs

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

+23
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ Specifies how new lines should be handled between union type groups.
196196
- `always` — Enforce one new line between each group, and forbid new lines inside a group.
197197
- `never` — No new lines are allowed in union types.
198198
199+
You can also enforce the newline behavior between two specific groups through the `groups` options.
200+
201+
See the [`groups`](#newlines-between-groups) option.
202+
199203
This option is only applicable when `partitionByNewLine` is `false`.
200204
201205
### groups
@@ -316,6 +320,25 @@ type Example =
316320
}
317321
```
318322

323+
#### Newlines between groups
324+
325+
You may place `newlinesBetween` objects between your groups to enforce the newline behavior between two specific groups.
326+
327+
See the [`newlinesBetween`](#newlinesbetween) option.
328+
329+
This feature is only applicable when `partitionByNewLine` is false.
330+
331+
```ts
332+
{
333+
newlinesBetween: 'always',
334+
groups: [
335+
'a',
336+
{ newlinesBetween: 'never' }, // Overrides the global newlinesBetween option
337+
'b',
338+
]
339+
}
340+
```
341+
319342
## Usage
320343

321344
<CodeTabs

0 commit comments

Comments
 (0)