diff --git a/.vitepress/config/en.ts b/.vitepress/config/en.ts index f27a936e6c7..56facb3dd3d 100644 --- a/.vitepress/config/en.ts +++ b/.vitepress/config/en.ts @@ -50,44 +50,54 @@ export const enConfig = defineLocaleConfig("root", { items: [ { text: "Overview", link: "/docs/guide/usage/linter" }, { - text: "Configuring Oxlint", - link: "/docs/guide/usage/linter/config", - }, - { - text: "Type-Aware Linting", - link: "/docs/guide/usage/linter/type-aware", - }, - { - text: "Nested Configs", - link: "/docs/guide/usage/linter/nested-config", - }, - { - text: "Rules", - link: "/docs/guide/usage/linter/rules", - }, - { - text: "Plugins", - link: "/docs/guide/usage/linter/plugins", - }, - { - text: "JS Plugins", - link: "/docs/guide/usage/linter/js-plugins", - }, - { - text: "Automatic Fixes", - link: "/docs/guide/usage/linter/automatic-fixes", - }, - { - text: "CLI reference", - link: "/docs/guide/usage/linter/cli", + text: "Configure and integrate", + items: [ + { text: "Quickstart", link: "/docs/guide/usage/linter/quickstart" }, + { text: "Configuration", link: "/docs/guide/usage/linter/config" }, + { text: "Editor setup", link: "/docs/guide/usage/linter/editors" }, + { text: "CI & other setup", link: "/docs/guide/usage/linter/ci" }, + { + text: "Nested configs", + link: "/docs/guide/usage/linter/nested-config", + }, + ], }, { - text: "Configuration file reference", - link: "/docs/guide/usage/linter/config-file-reference", + text: "Features", + items: [ + { text: "Built-in plugins", link: "/docs/guide/usage/linter/plugins" }, + { text: "Automatic fixes", link: "/docs/guide/usage/linter/automatic-fixes" }, + { text: "Ignore files", link: "/docs/guide/usage/linter/ignore-files" }, + { + text: "Inline ignore comments", + link: "/docs/guide/usage/linter/ignore-comments", + }, + { + text: "Multi-file analysis", + link: "/docs/guide/usage/linter/multi-file-analysis", + }, + { text: "Type-aware linting", link: "/docs/guide/usage/linter/type-aware" }, + { text: "JS plugins", link: "/docs/guide/usage/linter/js-plugins" }, + ], }, + // { + // text: "Migration", + // items: [ + // { text: "From ESLint", link: "/docs/guide/usage/linter/migrate-from-eslint" }, + // { text: "From Biome", link: "/docs/guide/usage/linter/migrate-from-biome" }, + // ], + // }, { - text: "Versioning", - link: "/docs/guide/usage/linter/versioning", + text: "Reference", + items: [ + { text: "Rules reference", link: "/docs/guide/usage/linter/rules" }, + { text: "CLI reference", link: "/docs/guide/usage/linter/cli" }, + { + text: "Config file reference", + link: "/docs/guide/usage/linter/config-file-reference", + }, + { text: "Versioning", link: "/docs/guide/usage/linter/versioning" }, + ], }, ], }, diff --git a/src/docs/guide/usage/linter.md b/src/docs/guide/usage/linter.md index b75dfe77b1e..d08cd4cb4fa 100644 --- a/src/docs/guide/usage/linter.md +++ b/src/docs/guide/usage/linter.md @@ -1,241 +1,145 @@ --- -title: Linter +title: Oxlint outline: deep badges: - src: https://img.shields.io/npm/dw/oxlint alt: npm weekly downloads --- -# Linter (oxlint) +# Oxlint -Oxlint (`/oh-eks-lint/`) is designed to catch erroneous or useless code without requiring any configurations by default. +Oxlint (`/oʊ-ɛks-lɪnt/`) is a high-performance linter for JavaScript and TypeScript built on the Oxc compiler stack. -:::info -At this stage, Oxlint can be used to fully replace ESLint in small to medium projects. +## Built for scale -For larger projects, our current advice is to turn off ESLint rules via -[eslint-plugin-oxlint](https://www.npmjs.com/package/eslint-plugin-oxlint), -and run Oxlint before ESLint in your local or CI setup for a quicker feedback loop. +Oxlint is built for large repositories and CI environments. Its architecture removes structural bottlenecks that limit performance in ESLint. -Oxlint now supports JS plugins with an ESLint-compatible API. JS plugins support is currently experimental but, -once stabilized, users will be able to migrate fully to Oxlint, running any ESLint rules/plugins that Oxlint -doesn't support natively as JS plugins. -::: +Our [benchmarks](https://github.com/oxc-project/bench-linter) show Oxlint is 50 to 100 times faster than ESLint. -## Features +## Correctness focused defaults -- 50 - 100 times faster than ESLint, and scales with the number of CPU cores - ([benchmark](https://github.com/oxc-project/bench-javascript-linter)). -- Over 600 rules with a growing list from `eslint`, `typescript`, `eslint-plugin-react`, - `eslint-plugin-jest`, `eslint-plugin-unicorn`, `eslint-plugin-jsx-a11y` and - [many more](https://github.com/oxc-project/oxc/issues/481). -- Supports - - [type-aware rules](./linter/type-aware) (alpha) - - [`.oxlintrc.json` configuration file](./linter/config) - - [Nested configuration file](./linter/nested-config) - - [Comment disabling](./linter/config.html#configuring-rules-via-inline-configuration-comments) - - [Automatic Fixes](./linter/automatic-fixes) - - [JS plugins](./linter/js-plugins) (experimental) - -## Language Support - -- Supports: - - JavaScript and TypeScript by their extensions `js`, `mjs`, `cjs`, `jsx`, `ts`, `mts`, `cts`, and `tsx`. - - `