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
143 changes: 103 additions & 40 deletions .vitepress/data/rules.json

Large diffs are not rendered by default.

70 changes: 48 additions & 22 deletions src/docs/guide/usage/formatter/generated-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ Custom groups have a higher priority than any predefined group.
If you want a predefined group to take precedence over a custom group,
you must write a custom group definition that does the same as what the predefined group does, and put it first in the list.

If you specify multiple conditions like `elementNamePattern`, `selector`, and `modifiers`,
all conditions must be met for an import to match the custom group (AND logic).

- Default: `[]`

#### experimentalSortImports.customGroups[n]
Expand All @@ -98,6 +101,24 @@ default: `""`

Name of the custom group, used in the `groups` option.

##### experimentalSortImports.customGroups[n].modifiers

type: `string[]`

Modifiers to match the import characteristics.
All specified modifiers must be present (AND logic).

Possible values: `"side_effect"`, `"type"`, `"value"`, `"default"`, `"wildcard"`, `"named"`

##### experimentalSortImports.customGroups[n].selector

type: `string`

Selector to match the import kind.

Possible values: `"type"`, `"side_effect_style"`, `"side_effect"`, `"style"`, `"index"`,
`"sibling"`, `"parent"`, `"subpath"`, `"internal"`, `"builtin"`, `"external"`, `"import"`

### experimentalSortImports.groups

type: `array`
Expand All @@ -119,8 +140,8 @@ You may enter modifiers in any order, but the selector must always come at the e
The list of selectors is sorted from most to least important:

- `type` — TypeScript type imports.
- `side-effect-style` — Side effect style imports.
- `side-effect` — Side effect imports.
- `side_effect_style` — Side effect style imports.
- `side_effect` — Side effect imports.
- `style` — Style imports.
- `index` — Main file from the current directory.
- `sibling` — Modules from the same directory.
Expand All @@ -133,16 +154,12 @@ The list of selectors is sorted from most to least important:

The list of modifiers is sorted from most to least important:

- `side-effect` — Side effect imports.
- `side_effect` — Side effect imports.
- `type` — TypeScript type imports.
- `value` — Value imports.
- `default` — Imports containing the default specifier.
- `wildcard` — Imports containing the wildcard (`* as`) specifier.
- `named` — Imports containing at least one named specifier.
- `multiline` — Imports on multiple lines.
- `singleline` — Imports on a single line.

See also <https://perfectionist.dev/rules/sort-imports#groups> for details.

- Default: See below

Expand All @@ -162,10 +179,6 @@ See also <https://perfectionist.dev/rules/sort-imports#groups> for details.

type: `array | string`

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

type: `string`

### experimentalSortImports.ignoreCase

type: `boolean`
Expand Down Expand Up @@ -481,6 +494,9 @@ Custom groups have a higher priority than any predefined group.
If you want a predefined group to take precedence over a custom group,
you must write a custom group definition that does the same as what the predefined group does, and put it first in the list.

If you specify multiple conditions like `elementNamePattern`, `selector`, and `modifiers`,
all conditions must be met for an import to match the custom group (AND logic).

- Default: `[]`

####### overrides[n].options.experimentalSortImports.customGroups[n]
Expand All @@ -503,6 +519,24 @@ default: `""`

Name of the custom group, used in the `groups` option.

######## overrides[n].options.experimentalSortImports.customGroups[n].modifiers

type: `string[]`

Modifiers to match the import characteristics.
All specified modifiers must be present (AND logic).

Possible values: `"side_effect"`, `"type"`, `"value"`, `"default"`, `"wildcard"`, `"named"`

######## overrides[n].options.experimentalSortImports.customGroups[n].selector

type: `string`

Selector to match the import kind.

Possible values: `"type"`, `"side_effect_style"`, `"side_effect"`, `"style"`, `"index"`,
`"sibling"`, `"parent"`, `"subpath"`, `"internal"`, `"builtin"`, `"external"`, `"import"`

###### overrides[n].options.experimentalSortImports.groups

type: `array`
Expand All @@ -524,8 +558,8 @@ You may enter modifiers in any order, but the selector must always come at the e
The list of selectors is sorted from most to least important:

- `type` — TypeScript type imports.
- `side-effect-style` — Side effect style imports.
- `side-effect` — Side effect imports.
- `side_effect_style` — Side effect style imports.
- `side_effect` — Side effect imports.
- `style` — Style imports.
- `index` — Main file from the current directory.
- `sibling` — Modules from the same directory.
Expand All @@ -538,16 +572,12 @@ The list of selectors is sorted from most to least important:

The list of modifiers is sorted from most to least important:

- `side-effect` — Side effect imports.
- `side_effect` — Side effect imports.
- `type` — TypeScript type imports.
- `value` — Value imports.
- `default` — Imports containing the default specifier.
- `wildcard` — Imports containing the wildcard (`* as`) specifier.
- `named` — Imports containing at least one named specifier.
- `multiline` — Imports on multiple lines.
- `singleline` — Imports on a single line.

See also <https://perfectionist.dev/rules/sort-imports#groups> for details.

- Default: See below

Expand All @@ -567,10 +597,6 @@ See also <https://perfectionist.dev/rules/sort-imports#groups> for details.

type: `array | string`

######## overrides[n].options.experimentalSortImports.groups[n][n]

type: `string`

###### overrides[n].options.experimentalSortImports.ignoreCase

type: `boolean`
Expand Down
3 changes: 2 additions & 1 deletion src/docs/guide/usage/linter/generated-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ search: false
- **`-c`**, **`--config`**=_`<./.oxlintrc.json>`_ &mdash;
Oxlint configuration file

* only `.json` extension is supported
* `.json` config files are supported in all runtimes
* JavaScript/TypeScript config files are experimental and require running via Node.js
* you can use comments in configuration files.
* tries to be compatible with ESLint v8's format

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "eslint/array-callback-return"
category: "Pedantic"
default: false
type_aware: false
fix: "none"
fix: "pending"
---

<!-- This file is auto-generated by tasks/website_linter/src/rules/doc_page.rs. Do not edit it manually. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "eslint/no-case-declarations"
category: "Pedantic"
default: false
type_aware: false
fix: "none"
fix: "pending"
---

<!-- This file is auto-generated by tasks/website_linter/src/rules/doc_page.rs. Do not edit it manually. -->
Expand Down
Loading