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
27 changes: 16 additions & 11 deletions src/docs/guide/usage/formatter/generated-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ search: false

Most options are the same as Prettier's options.
See also <https://prettier.io/docs/options>
But some options are our own extensions.

In addition, some options are our own extensions.

## arrowParens

Expand Down Expand Up @@ -59,41 +60,45 @@ type: `string[]`

### experimentalSortImports.ignoreCase

type: `boolean`
type: `boolean | null`

default: `true`
Ignore case when sorting. (Default: `true`)

### experimentalSortImports.internalPattern

type: `string[]`

Glob patterns to identify internal imports.

### experimentalSortImports.newlinesBetween

type: `boolean`
type: `boolean | null`

default: `true`
Add newlines between import groups. (Default: `true`)

### experimentalSortImports.order

type: `string | null`

Sort order. (Default: `"asc"`)

### experimentalSortImports.partitionByComment

type: `boolean`
type: `boolean | null`

default: `false`
Partition imports by comments. (Default: `false`)

### experimentalSortImports.partitionByNewline

type: `boolean`
type: `boolean | null`

default: `false`
Partition imports by newlines. (Default: `false`)

### experimentalSortImports.sortSideEffects

type: `boolean`
type: `boolean | null`

default: `false`
Sort side-effect imports. (Default: `false`)

## experimentalSortPackageJson

Expand Down
86 changes: 83 additions & 3 deletions src/docs/guide/usage/linter/generated-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ Example
}
```

## $schema

type: `string | null`

Schema URI for editor tooling.

## categories

type: `object`
Expand Down Expand Up @@ -143,13 +149,50 @@ Globs to ignore during linting. These are resolved from the configuration file p

## jsPlugins

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

JS plugins.

Note: JS plugins are experimental and not subject to semver.
They are not supported in language server at present.

### jsPlugins[n]

type: `object | string`

#### jsPlugins[n].name

type: `string`

Custom name/alias for the plugin.

Note: The following plugin names are reserved because they are implemented natively in Rust within oxlint and cannot be used for JS plugins:

- react (includes react-hooks)
- unicorn
- typescript
- oxc
- import (includes import-x)
- jsdoc
- jest
- vitest
- jsx-a11y
- nextjs
- react-perf
- promise
- node
- regex
- vue
- eslint

If you need to use the JavaScript version of any of these plugins, provide a custom alias to avoid conflicts.

#### jsPlugins[n].specifier

type: `string`

Path or package name of the plugin

## overrides

type: `array`
Expand Down Expand Up @@ -178,13 +221,50 @@ Enabled or disabled specific global variables.

#### overrides[n].jsPlugins

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

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].jsPlugins[n]

type: `object | string`

###### overrides[n].jsPlugins[n].name

type: `string`

Custom name/alias for the plugin.

Note: The following plugin names are reserved because they are implemented natively in Rust within oxlint and cannot be used for JS plugins:

- react (includes react-hooks)
- unicorn
- typescript
- oxc
- import (includes import-x)
- jsdoc
- jest
- vitest
- jsx-a11y
- nextjs
- react-perf
- promise
- node
- regex
- vue
- eslint

If you need to use the JavaScript version of any of these plugins, provide a custom alias to avoid conflicts.

###### overrides[n].jsPlugins[n].specifier

type: `string`

Path or package name of the plugin

#### overrides[n].plugins

type: `array | null`
Expand Down Expand Up @@ -504,7 +584,7 @@ type: `object`

Configure Vitest plugin rules.

See [eslint-plugin-vitest](https://github.com/veritem/eslint-plugin-vitest)'s
See [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest)'s
configuration for a full reference.

#### settings.vitest.typecheck
Expand Down
24 changes: 14 additions & 10 deletions src/docs/guide/usage/linter/generated-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ search: false

The progress of all rule implementations is tracked [here](https://github.com/oxc-project/oxc/issues/481).

- Total number of rules: 630
- Total number of rules: 634
- Rules turned on by default: 104

**Legend for 'Fixable?' column:**
Expand Down Expand Up @@ -277,7 +277,7 @@ Lints which prevent the use of language and library features. Must not be enable
| [anchor-ambiguous-text](/docs/guide/usage/linter/rules/jsx_a11y/anchor-ambiguous-text.html) | jsx_a11y | | |
| [no-new-require](/docs/guide/usage/linter/rules/node/no-new-require.html) | node | | |
| [no-process-env](/docs/guide/usage/linter/rules/node/no-process-env.html) | node | | |
| [bad-bitwise-operator](/docs/guide/usage/linter/rules/oxc/bad-bitwise-operator.html) | oxc | | 🚧 |
| [bad-bitwise-operator](/docs/guide/usage/linter/rules/oxc/bad-bitwise-operator.html) | oxc | | 💡 |
| [no-async-await](/docs/guide/usage/linter/rules/oxc/no-async-await.html) | oxc | | |
| [no-barrel-file](/docs/guide/usage/linter/rules/oxc/no-barrel-file.html) | oxc | | |
| [no-const-enum](/docs/guide/usage/linter/rules/oxc/no-const-enum.html) | oxc | | 🛠️ |
Expand Down Expand Up @@ -346,7 +346,7 @@ code that is most likely wrong or useless.
| [no-unassigned-import](/docs/guide/usage/linter/rules/import/no-unassigned-import.html) | import | | |
| [no-commented-out-tests](/docs/guide/usage/linter/rules/jest/no-commented-out-tests.html) | jest | | |
| [approx-constant](/docs/guide/usage/linter/rules/oxc/approx-constant.html) | oxc | | 💡 |
| [misrefactored-assign-op](/docs/guide/usage/linter/rules/oxc/misrefactored-assign-op.html) | oxc | | 🚧 |
| [misrefactored-assign-op](/docs/guide/usage/linter/rules/oxc/misrefactored-assign-op.html) | oxc | | 💡 |
| [no-async-endpoint-handlers](/docs/guide/usage/linter/rules/oxc/no-async-endpoint-handlers.html) | oxc | | |
| [no-this-in-exported-function](/docs/guide/usage/linter/rules/oxc/no-this-in-exported-function.html) | oxc | | |
| [always-return](/docs/guide/usage/linter/rules/promise/always-return.html) | promise | | |
Expand Down Expand Up @@ -378,7 +378,7 @@ code that is most likely wrong or useless.
| [no-required-prop-with-default](/docs/guide/usage/linter/rules/vue/no-required-prop-with-default.html) | vue | | 🚧 |
| [require-default-export](/docs/guide/usage/linter/rules/vue/require-default-export.html) | vue | | |

## Pedantic (111):
## Pedantic (112):

Lints which are rather strict or have occasional false positives.
| Rule name | Source | Default | Fixable? |
Expand All @@ -396,6 +396,7 @@ Lints which are rather strict or have occasional false positives.
| [no-constructor-return](/docs/guide/usage/linter/rules/eslint/no-constructor-return.html) | eslint | | |
| [no-else-return](/docs/guide/usage/linter/rules/eslint/no-else-return.html) | eslint | | 🛠️ |
| [no-fallthrough](/docs/guide/usage/linter/rules/eslint/no-fallthrough.html) | eslint | | 🚧 |
| [no-inline-comments](/docs/guide/usage/linter/rules/eslint/no-inline-comments.html) | eslint | | |
| [no-inner-declarations](/docs/guide/usage/linter/rules/eslint/no-inner-declarations.html) | eslint | | |
| [no-lonely-if](/docs/guide/usage/linter/rules/eslint/no-lonely-if.html) | eslint | | 🚧 |
| [no-loop-func](/docs/guide/usage/linter/rules/eslint/no-loop-func.html) | eslint | | |
Expand Down Expand Up @@ -440,7 +441,7 @@ Lints which are rather strict or have occasional false positives.
| [no-unsafe-member-access](/docs/guide/usage/linter/rules/typescript/no-unsafe-member-access.html) | typescript | | 🚧 |
| [no-unsafe-return](/docs/guide/usage/linter/rules/typescript/no-unsafe-return.html) | typescript | | 🚧 |
| [only-throw-error](/docs/guide/usage/linter/rules/typescript/only-throw-error.html) | typescript | | 🚧 |
| [prefer-enum-initializers](/docs/guide/usage/linter/rules/typescript/prefer-enum-initializers.html) | typescript | | 🚧 |
| [prefer-enum-initializers](/docs/guide/usage/linter/rules/typescript/prefer-enum-initializers.html) | typescript | | 💡 |
| [prefer-includes](/docs/guide/usage/linter/rules/typescript/prefer-includes.html) | typescript | | 🚧 |
| [prefer-nullish-coalescing](/docs/guide/usage/linter/rules/typescript/prefer-nullish-coalescing.html) | typescript | | 🚧 |
| [prefer-promise-reject-errors](/docs/guide/usage/linter/rules/typescript/prefer-promise-reject-errors.html) | typescript | | 🚧 |
Expand All @@ -460,13 +461,13 @@ Lints which are rather strict or have occasional false positives.
| [no-hex-escape](/docs/guide/usage/linter/rules/unicorn/no-hex-escape.html) | unicorn | | 🛠️ |
| [no-instanceof-array](/docs/guide/usage/linter/rules/unicorn/no-instanceof-array.html) | unicorn | | 🛠️ |
| [no-lonely-if](/docs/guide/usage/linter/rules/unicorn/no-lonely-if.html) | unicorn | | |
| [no-negation-in-equality-check](/docs/guide/usage/linter/rules/unicorn/no-negation-in-equality-check.html) | unicorn | | 🚧 |
| [no-negation-in-equality-check](/docs/guide/usage/linter/rules/unicorn/no-negation-in-equality-check.html) | unicorn | | 💡 |
| [no-new-buffer](/docs/guide/usage/linter/rules/unicorn/no-new-buffer.html) | unicorn | | 🚧 |
| [no-object-as-default-parameter](/docs/guide/usage/linter/rules/unicorn/no-object-as-default-parameter.html) | unicorn | | |
| [no-static-only-class](/docs/guide/usage/linter/rules/unicorn/no-static-only-class.html) | unicorn | | ⚠️🛠️️ |
| [no-this-assignment](/docs/guide/usage/linter/rules/unicorn/no-this-assignment.html) | unicorn | | |
| [no-typeof-undefined](/docs/guide/usage/linter/rules/unicorn/no-typeof-undefined.html) | unicorn | | 🚧 |
| [no-unnecessary-array-flat-depth](/docs/guide/usage/linter/rules/unicorn/no-unnecessary-array-flat-depth.html) | unicorn | | 🚧 |
| [no-unnecessary-array-flat-depth](/docs/guide/usage/linter/rules/unicorn/no-unnecessary-array-flat-depth.html) | unicorn | | 💡 |
| [no-unnecessary-array-splice-count](/docs/guide/usage/linter/rules/unicorn/no-unnecessary-array-splice-count.html) | unicorn | | 🛠️ |
| [no-unnecessary-slice-end](/docs/guide/usage/linter/rules/unicorn/no-unnecessary-slice-end.html) | unicorn | | 🛠️ |
| [no-unreadable-iife](/docs/guide/usage/linter/rules/unicorn/no-unreadable-iife.html) | unicorn | | |
Expand Down Expand Up @@ -495,12 +496,13 @@ Lints which are rather strict or have occasional false positives.
| [prefer-type-error](/docs/guide/usage/linter/rules/unicorn/prefer-type-error.html) | unicorn | | 🛠️ |
| [require-number-to-fixed-digits-argument](/docs/guide/usage/linter/rules/unicorn/require-number-to-fixed-digits-argument.html) | unicorn | | 🛠️ |

## Style (173):
## Style (176):

Code that should be written in a more idiomatic way.
| Rule name | Source | Default | Fixable? |
| ------------------------------------ | ---------- | ------- | -------- |
| [arrow-body-style](/docs/guide/usage/linter/rules/eslint/arrow-body-style.html) | eslint | | 🛠️ |
| [capitalized-comments](/docs/guide/usage/linter/rules/eslint/capitalized-comments.html) | eslint | | 🛠️ |
| [curly](/docs/guide/usage/linter/rules/eslint/curly.html) | eslint | | 🛠️ |
| [default-case-last](/docs/guide/usage/linter/rules/eslint/default-case-last.html) | eslint | | |
| [default-param-last](/docs/guide/usage/linter/rules/eslint/default-param-last.html) | eslint | | |
Expand Down Expand Up @@ -574,7 +576,7 @@ Code that should be written in a more idiomatic way.
| [no-test-return-statement](/docs/guide/usage/linter/rules/jest/no-test-return-statement.html) | jest | | |
| [no-untyped-mock-factory](/docs/guide/usage/linter/rules/jest/no-untyped-mock-factory.html) | jest | | 🛠️ |
| [padding-around-test-blocks](/docs/guide/usage/linter/rules/jest/padding-around-test-blocks.html) | jest | | 🛠️ |
| [prefer-called-with](/docs/guide/usage/linter/rules/jest/prefer-called-with.html) | jest | | |
| [prefer-called-with](/docs/guide/usage/linter/rules/jest/prefer-called-with.html) | jest | | 🛠️ |
| [prefer-comparison-matcher](/docs/guide/usage/linter/rules/jest/prefer-comparison-matcher.html) | jest | | 🛠️ |
| [prefer-each](/docs/guide/usage/linter/rules/jest/prefer-each.html) | jest | | |
| [prefer-equality-matcher](/docs/guide/usage/linter/rules/jest/prefer-equality-matcher.html) | jest | | |
Expand All @@ -588,6 +590,8 @@ Code that should be written in a more idiomatic way.
| [prefer-strict-equal](/docs/guide/usage/linter/rules/jest/prefer-strict-equal.html) | jest | | 🛠️ |
| [prefer-to-be](/docs/guide/usage/linter/rules/jest/prefer-to-be.html) | jest | | 🛠️ |
| [prefer-to-contain](/docs/guide/usage/linter/rules/jest/prefer-to-contain.html) | jest | | 🛠️ |
| [prefer-to-have-been-called](/docs/guide/usage/linter/rules/jest/prefer-to-have-been-called.html) | jest | | 🛠️ |
| [prefer-to-have-been-called-times](/docs/guide/usage/linter/rules/jest/prefer-to-have-been-called-times.html) | jest | | 🛠️ |
| [prefer-to-have-length](/docs/guide/usage/linter/rules/jest/prefer-to-have-length.html) | jest | | 🛠️ |
| [prefer-todo](/docs/guide/usage/linter/rules/jest/prefer-todo.html) | jest | | 🛠️ |
| [require-hook](/docs/guide/usage/linter/rules/jest/require-hook.html) | jest | | |
Expand Down Expand Up @@ -619,7 +623,7 @@ Code that should be written in a more idiomatic way.
| [consistent-type-definitions](/docs/guide/usage/linter/rules/typescript/consistent-type-definitions.html) | typescript | | ⚠️🛠️️ |
| [consistent-type-imports](/docs/guide/usage/linter/rules/typescript/consistent-type-imports.html) | typescript | | 🛠️ |
| [no-empty-interface](/docs/guide/usage/linter/rules/typescript/no-empty-interface.html) | typescript | | |
| [no-inferrable-types](/docs/guide/usage/linter/rules/typescript/no-inferrable-types.html) | typescript | | 🚧 |
| [no-inferrable-types](/docs/guide/usage/linter/rules/typescript/no-inferrable-types.html) | typescript | | 💡 |
| [prefer-for-of](/docs/guide/usage/linter/rules/typescript/prefer-for-of.html) | typescript | | 🚧 |
| [prefer-function-type](/docs/guide/usage/linter/rules/typescript/prefer-function-type.html) | typescript | | 🛠️ |
| [prefer-namespace-keyword](/docs/guide/usage/linter/rules/typescript/prefer-namespace-keyword.html) | typescript | | 🛠️ |
Expand Down
Loading