Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions src/docs/guide/usage/formatter/generated-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ search: false
Most options are the same as Prettier's options.
See also <https://prettier.io/docs/options>

# arrowParens
## arrowParens

type: `string | null`

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

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

# embeddedLanguageFormatting
## embeddedLanguageFormatting

type: `string | null`

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

# endOfLine
## endOfLine

type: `string | null`

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

# experimentalSortImports
## experimentalSortImports

type: `object | null`

Experimental: Sort import statements. Disabled by default.

## experimentalSortImports.groups
### experimentalSortImports.groups

type: `array | null`

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

### experimentalSortImports.groups[n]
#### experimentalSortImports.groups[n]

type: `string[]`

## experimentalSortImports.ignoreCase
### experimentalSortImports.ignoreCase

type: `boolean`

default: `true`

## experimentalSortImports.newlinesBetween
### experimentalSortImports.internalPattern

type: `string[]`

### experimentalSortImports.newlinesBetween

type: `boolean`

default: `true`

# experimentalSortImports.order
### experimentalSortImports.order

type: `string | null`

## experimentalSortImports.partitionByComment
### experimentalSortImports.partitionByComment

type: `boolean`

default: `false`

## experimentalSortImports.partitionByNewline
### experimentalSortImports.partitionByNewline

type: `boolean`

default: `false`

## experimentalSortImports.sortSideEffects
### experimentalSortImports.sortSideEffects

type: `boolean`

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

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

# objectWrap
## objectWrap

type: `string | null`

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

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

# quoteProps
## quoteProps

type: `string | null`

Expand Down Expand Up @@ -144,7 +148,7 @@ type: `integer | null`

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

# trailingComma
## trailingComma

type: `string | null`

Expand Down
47 changes: 36 additions & 11 deletions src/docs/guide/usage/linter/generated-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ type: `array`

type: `object`

### overrides[n].env
#### overrides[n].env

type: `object | null`

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

A set of glob patterns.

### overrides[n].globals
#### overrides[n].globals

type: `object | null`

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

### overrides[n].plugins
#### overrides[n].plugins

type: `array | null`

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

##### overrides[n].plugins[n]

type: `string`

#### overrides[n].rules

type: `object`

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

# plugins
## plugins

type: `array | null`

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

### plugins[n]

type: `string`

## rules

type: `object`
Expand Down Expand Up @@ -383,10 +391,7 @@ Example:

#### settings.jsx-a11y.polymorphicPropName

type: `[
string,
null
]`
type: `string | null`

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

#### settings.next.rootDir

type: `string | array`
type: `array | string`

##### settings.next.rootDir[n]

type: `string`

### settings.react

Expand Down Expand Up @@ -447,7 +456,15 @@ Example:

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

type: `string | object | object`
type: `object | string`

###### settings.react.formComponents[n].attribute

type: `string`

###### settings.react.formComponents[n].name

type: `string`

#### settings.react.linkComponents

Expand Down Expand Up @@ -478,7 +495,15 @@ Example:

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

type: `string | object | object`
type: `object | string`

###### settings.react.linkComponents[n].attribute

type: `string`

###### settings.react.linkComponents[n].name

type: `string`

### settings.vitest

Expand Down
5 changes: 1 addition & 4 deletions src/docs/guide/usage/linter/rules/eslint/default-case.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,7 @@ This rule accepts a configuration object with the following properties:

### commentPattern

type: `[
string,
null
]`
type: `string | null`

A regex pattern used to detect comments that mark the absence
of a `default` case as intentional.
Expand Down
2 changes: 1 addition & 1 deletion src/docs/guide/usage/linter/rules/eslint/func-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ default: `false`

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

## namedExports
### namedExports

type: `string | null`

Expand Down
10 changes: 2 additions & 8 deletions src/docs/guide/usage/linter/rules/eslint/new-cap.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,7 @@ default: `true`

### capIsNewExceptionPattern

type: `[
string,
null
]`
type: `string | null`

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

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

### newIsCapExceptionPattern

type: `[
string,
null
]`
type: `string | null`

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var foo = Boolean(!!bar);
if (!!foo) {}
if (Boolean(foo)) {}

// with "enforceForLogicalOperands" option enabled
// with "enforceForInnerExpressions" option enabled
if (!!foo || bar) {}
```

Expand All @@ -49,7 +49,7 @@ var foo = Boolean(bar);
if (foo) {}
if (foo) {}

// with "enforceForLogicalOperands" option enabled
// with "enforceForInnerExpressions" option enabled
if (foo || bar) {}
```

Expand Down
5 changes: 1 addition & 4 deletions src/docs/guide/usage/linter/rules/eslint/no-fallthrough.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,7 @@ Whether to allow empty case clauses to fall through.

### commentPattern

type: `[
string,
null
]`
type: `string | null`

Custom regex pattern to match fallthrough comments.

Expand Down
2 changes: 1 addition & 1 deletion src/docs/guide/usage/linter/rules/import/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ default: `"never"`

Configuration for `.jsx` file extensions.

## requireExtension
### requireExtension

type: `string | null`

Expand Down
46 changes: 20 additions & 26 deletions src/docs/guide/usage/linter/rules/jest/consistent-test-it.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,43 +57,37 @@ describe("foo", function() {
});
```

#### Options

This rule can be configured as follows
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),
to use it, add the following configuration to your `.eslintrc.json`:

```json5
```json
{
type: 'object',
properties: {
fn: {
enum: ['it', 'test'],
},
withinDescribe: {
enum: ['it', 'test'],
},
},
additionalProperties: false,
"rules": {
"vitest/consistent-test-it": "error"
}
}
```

##### fn
## Configuration

This rule accepts a configuration object with the following properties:

### fn

type: `"it" | "test"`

default: `"test"`

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

##### withinDescribe
### withinDescribe

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

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),
to use it, add the following configuration to your `.eslintrc.json`:
default: `"it"`

```json
{
"rules": {
"vitest/consistent-test-it": "error"
}
}
```
Decides whether to use `test` or `it` within a `describe` scope.
If only `fn` is provided, this will default to the value of `fn`.

## How to use

Expand Down
Loading