Skip to content

Commit 0af1259

Browse files
authored
docs: Regenerate docs with latest fixes. (#680)
* docs: Regenerate docs with latest fixes. None of these are functionality changes or represent changes to the oxlint/oxfmt codebases themselves as far as I'm aware. This just fixes the header depths and adds/fixes some docs for rules that lacked them or were incorrect. * Fix the generated-config.md depth
1 parent 58d51f9 commit 0af1259

19 files changed

+171
-111
lines changed

src/docs/guide/usage/formatter/generated-config.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ search: false
77
Most options are the same as Prettier's options.
88
See also <https://prettier.io/docs/options>
99

10-
# arrowParens
10+
## arrowParens
1111

1212
type: `string | null`
1313

@@ -25,65 +25,69 @@ type: `boolean | null`
2525

2626
Print spaces between brackets in object literals. (Default: true)
2727

28-
# embeddedLanguageFormatting
28+
## embeddedLanguageFormatting
2929

3030
type: `string | null`
3131

3232
Control whether formats quoted code embedded in the file. (Default: "auto")
3333

34-
# endOfLine
34+
## endOfLine
3535

3636
type: `string | null`
3737

3838
Which end of line characters to apply. (Default: "lf")
3939

40-
# experimentalSortImports
40+
## experimentalSortImports
4141

4242
type: `object | null`
4343

4444
Experimental: Sort import statements. Disabled by default.
4545

46-
## experimentalSortImports.groups
46+
### experimentalSortImports.groups
4747

4848
type: `array | null`
4949

5050
Custom groups configuration for organizing imports.
5151
Each array element represents a group, and multiple group names in the same array are treated as one.
5252
Accepts both `string` and `string[]` as group elements.
5353

54-
### experimentalSortImports.groups[n]
54+
#### experimentalSortImports.groups[n]
5555

5656
type: `string[]`
5757

58-
## experimentalSortImports.ignoreCase
58+
### experimentalSortImports.ignoreCase
5959

6060
type: `boolean`
6161

6262
default: `true`
6363

64-
## experimentalSortImports.newlinesBetween
64+
### experimentalSortImports.internalPattern
65+
66+
type: `string[]`
67+
68+
### experimentalSortImports.newlinesBetween
6569

6670
type: `boolean`
6771

6872
default: `true`
6973

70-
# experimentalSortImports.order
74+
### experimentalSortImports.order
7175

7276
type: `string | null`
7377

74-
## experimentalSortImports.partitionByComment
78+
### experimentalSortImports.partitionByComment
7579

7680
type: `boolean`
7781

7882
default: `false`
7983

80-
## experimentalSortImports.partitionByNewline
84+
### experimentalSortImports.partitionByNewline
8185

8286
type: `boolean`
8387

8488
default: `false`
8589

86-
## experimentalSortImports.sortSideEffects
90+
### experimentalSortImports.sortSideEffects
8791

8892
type: `boolean`
8993

@@ -101,7 +105,7 @@ type: `boolean | null`
101105

102106
Use single quotes instead of double quotes in JSX. (Default: false)
103107

104-
# objectWrap
108+
## objectWrap
105109

106110
type: `string | null`
107111

@@ -114,7 +118,7 @@ type: `integer | null`
114118

115119
The line length that the printer will wrap on. (Default: 100)
116120

117-
# quoteProps
121+
## quoteProps
118122

119123
type: `string | null`
120124

@@ -144,7 +148,7 @@ type: `integer | null`
144148

145149
Number of spaces per indentation level. (Default: 2)
146150

147-
# trailingComma
151+
## trailingComma
148152

149153
type: `string | null`
150154

src/docs/guide/usage/linter/generated-config.md

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ type: `array`
165165

166166
type: `object`
167167

168-
### overrides[n].env
168+
#### overrides[n].env
169169

170170
type: `object | null`
171171

@@ -177,7 +177,7 @@ type: `string[]`
177177

178178
A set of glob patterns.
179179

180-
### overrides[n].globals
180+
#### overrides[n].globals
181181

182182
type: `object | null`
183183

@@ -192,7 +192,7 @@ JS plugins for this override.
192192
Note: JS plugins are experimental and not subject to semver.
193193
They are not supported in language server at present.
194194

195-
### overrides[n].plugins
195+
#### overrides[n].plugins
196196

197197
type: `array | null`
198198

@@ -201,13 +201,17 @@ default: `null`
201201
Optionally change what plugins are enabled for this override. When
202202
omitted, the base config's plugins are used.
203203

204+
##### overrides[n].plugins[n]
205+
206+
type: `string`
207+
204208
#### overrides[n].rules
205209

206210
type: `object`
207211

208212
See [Oxlint Rules](https://oxc.rs/docs/guide/usage/linter/rules.html)
209213

210-
# plugins
214+
## plugins
211215

212216
type: `array | null`
213217

@@ -220,6 +224,10 @@ You can view the list of available plugins on
220224
NOTE: Setting the `plugins` field will overwrite the base set of plugins.
221225
The `plugins` array should reflect all of the plugins you want to use.
222226

227+
### plugins[n]
228+
229+
type: `string`
230+
223231
## rules
224232

225233
type: `object`
@@ -383,10 +391,7 @@ Example:
383391

384392
#### settings.jsx-a11y.polymorphicPropName
385393

386-
type: `[
387-
string,
388-
null
389-
]`
394+
type: `string | null`
390395

391396
An optional setting that define the prop your code uses to create polymorphic components.
392397
This setting will be used to determine the element type in rules that
@@ -409,7 +414,11 @@ Configure Next.js plugin rules.
409414

410415
#### settings.next.rootDir
411416

412-
type: `string | array`
417+
type: `array | string`
418+
419+
##### settings.next.rootDir[n]
420+
421+
type: `string`
413422

414423
### settings.react
415424

@@ -447,7 +456,15 @@ Example:
447456

448457
##### settings.react.formComponents[n]
449458

450-
type: `string | object | object`
459+
type: `object | string`
460+
461+
###### settings.react.formComponents[n].attribute
462+
463+
type: `string`
464+
465+
###### settings.react.formComponents[n].name
466+
467+
type: `string`
451468

452469
#### settings.react.linkComponents
453470

@@ -478,7 +495,15 @@ Example:
478495

479496
##### settings.react.linkComponents[n]
480497

481-
type: `string | object | object`
498+
type: `object | string`
499+
500+
###### settings.react.linkComponents[n].attribute
501+
502+
type: `string`
503+
504+
###### settings.react.linkComponents[n].name
505+
506+
type: `string`
482507

483508
### settings.vitest
484509

src/docs/guide/usage/linter/rules/eslint/default-case.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,7 @@ This rule accepts a configuration object with the following properties:
6868

6969
### commentPattern
7070

71-
type: `[
72-
string,
73-
null
74-
]`
71+
type: `string | null`
7572

7673
A regex pattern used to detect comments that mark the absence
7774
of a `default` case as intentional.

src/docs/guide/usage/linter/rules/eslint/func-style.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ default: `false`
164164

165165
When true, functions with type annotations are allowed regardless of the style setting.
166166

167-
## namedExports
167+
### namedExports
168168

169169
type: `string | null`
170170

src/docs/guide/usage/linter/rules/eslint/new-cap.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -339,10 +339,7 @@ default: `true`
339339

340340
### capIsNewExceptionPattern
341341

342-
type: `[
343-
string,
344-
null
345-
]`
342+
type: `string | null`
346343

347344
A regex pattern to match exceptions for functions with names starting with an uppercase letter.
348345

@@ -364,10 +361,7 @@ default: `true`
364361

365362
### newIsCapExceptionPattern
366363

367-
type: `[
368-
string,
369-
null
370-
]`
364+
type: `string | null`
371365

372366
A regex pattern to match exceptions for constructor names starting with an uppercase letter.
373367

src/docs/guide/usage/linter/rules/eslint/no-extra-boolean-cast.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var foo = Boolean(!!bar);
3636
if (!!foo) {}
3737
if (Boolean(foo)) {}
3838

39-
// with "enforceForLogicalOperands" option enabled
39+
// with "enforceForInnerExpressions" option enabled
4040
if (!!foo || bar) {}
4141
```
4242

@@ -49,7 +49,7 @@ var foo = Boolean(bar);
4949
if (foo) {}
5050
if (foo) {}
5151

52-
// with "enforceForLogicalOperands" option enabled
52+
// with "enforceForInnerExpressions" option enabled
5353
if (foo || bar) {}
5454
```
5555

src/docs/guide/usage/linter/rules/eslint/no-fallthrough.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,7 @@ Whether to allow empty case clauses to fall through.
198198

199199
### commentPattern
200200

201-
type: `[
202-
string,
203-
null
204-
]`
201+
type: `string | null`
205202

206203
Custom regex pattern to match fallthrough comments.
207204

src/docs/guide/usage/linter/rules/import/extensions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ default: `"never"`
109109

110110
Configuration for `.jsx` file extensions.
111111

112-
## requireExtension
112+
### requireExtension
113113

114114
type: `string | null`
115115

src/docs/guide/usage/linter/rules/jest/consistent-test-it.md

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -57,43 +57,37 @@ describe("foo", function() {
5757
});
5858
```
5959

60-
#### Options
61-
62-
This rule can be configured as follows
60+
This rule is compatible with [eslint-plugin-vitest](https://github.com/veritem/eslint-plugin-vitest/blob/v1.1.9/docs/rules/consistent-test-it.md),
61+
to use it, add the following configuration to your `.eslintrc.json`:
6362

64-
```json5
63+
```json
6564
{
66-
type: 'object',
67-
properties: {
68-
fn: {
69-
enum: ['it', 'test'],
70-
},
71-
withinDescribe: {
72-
enum: ['it', 'test'],
73-
},
74-
},
75-
additionalProperties: false,
65+
"rules": {
66+
"vitest/consistent-test-it": "error"
67+
}
7668
}
7769
```
7870

79-
##### fn
71+
## Configuration
72+
73+
This rule accepts a configuration object with the following properties:
74+
75+
### fn
76+
77+
type: `"it" | "test"`
78+
79+
default: `"test"`
8080

8181
Decides whether to use `test` or `it`.
8282

83-
##### withinDescribe
83+
### withinDescribe
8484

85-
Decides whether to use `test` or `it` within a `describe` scope.
85+
type: `"it" | "test"`
8686

87-
This rule is compatible with [eslint-plugin-vitest](https://github.com/veritem/eslint-plugin-vitest/blob/v1.1.9/docs/rules/consistent-test-it.md),
88-
to use it, add the following configuration to your `.eslintrc.json`:
87+
default: `"it"`
8988

90-
```json
91-
{
92-
"rules": {
93-
"vitest/consistent-test-it": "error"
94-
}
95-
}
96-
```
89+
Decides whether to use `test` or `it` within a `describe` scope.
90+
If only `fn` is provided, this will default to the value of `fn`.
9791

9892
## How to use
9993

0 commit comments

Comments
 (0)