diff --git a/docs/oxc/index.md b/docs/oxc/index.md index fe44b72c6..1c8cd267f 100644 --- a/docs/oxc/index.md +++ b/docs/oxc/index.md @@ -4,25 +4,53 @@ outline: deep # DevTools for Oxc -DevTools for Oxc (`@vitejs/devtools-oxc`) is a built-in integration that inspects the [Oxc](https://oxc.rs/) toolchain — oxlint and oxfmt. It was donated from [`yuyinws/oxc-inspector`](https://github.com/yuyinws/oxc-inspector) by Leo. +DevTools for Oxc (`@vitejs/devtools-oxc`) inspects Oxlint and Oxfmt from the [Oxc](https://oxc.rs/) toolchain. It was donated from [`yuyinws/oxc-inspector`](https://github.com/yuyinws/oxc-inspector) by Leo. ## What it does -- **Visualize lint output** — explore oxlint results in an interactive interface. -- **Config helper** — read oxlint and oxfmt configuration at a glance. +- **Toolchain overview** — view installed versions and configuration files. +- **Lint inspection** — run Oxlint and inspect diagnostics. +- **Configuration analysis** — explore rules, plugins, and overrides. +- **Documentation** — open the Oxlint and Oxfmt documentation. ## Getting started -DevTools for Oxc ships with Vite DevTools. When its package is present it mounts via `DevToolsOxc()`; otherwise open the **Oxc** launcher in the dock to install it on demand, then restart the dev server. +Follow [Getting Started](/guide/) to set up Vite DevTools, then open the **Oxc** launcher and install the integration. Restart the development server to activate it. -```ts [vite.config.ts] -import { DevTools } from '@vitejs/devtools' -import { DevToolsOxc } from '@vitejs/devtools-oxc/vite' -import { defineConfig } from 'vite' +It can also run as a standalone CLI: -export default defineConfig({ - plugins: [DevTools(), DevToolsOxc()], -}) +```sh +npx @vitejs/devtools-oxc ``` -It also runs standalone from the CLI with `npx @vitejs/devtools-oxc`. +## Features + +### Overview + +View installed versions, update status, and configuration files. + +![Oxc DevTools overview](/features/oxc/overview.png) + +### Lint Inspector + +Run Oxlint and inspect current and previous results. + +![Oxlint result history](/features/oxc/lint-list.png) + +View run metadata and diagnostics grouped by file. + +![Oxlint result details](/features/oxc/lint-detail.png) + +### Config Inspector + +Review the resolved configuration and rule summary. + +![Oxlint configuration overview](/features/oxc/config-overview.png) + +Search and filter rules by category, plugin, usage, and state. + +![Oxlint rule table](/features/oxc/config-rules.png) + +Inspect the plugins and rules applied by each file-pattern override. + +![Oxlint configuration overrides](/features/oxc/config-overrides.png) diff --git a/docs/public/features/oxc/config-overrides.png b/docs/public/features/oxc/config-overrides.png new file mode 100644 index 000000000..ed0b2a219 Binary files /dev/null and b/docs/public/features/oxc/config-overrides.png differ diff --git a/docs/public/features/oxc/config-overview.png b/docs/public/features/oxc/config-overview.png new file mode 100644 index 000000000..0d3ac7cd4 Binary files /dev/null and b/docs/public/features/oxc/config-overview.png differ diff --git a/docs/public/features/oxc/config-rules.png b/docs/public/features/oxc/config-rules.png new file mode 100644 index 000000000..58c6892b7 Binary files /dev/null and b/docs/public/features/oxc/config-rules.png differ diff --git a/docs/public/features/oxc/lint-detail.png b/docs/public/features/oxc/lint-detail.png new file mode 100644 index 000000000..6a0efa07d Binary files /dev/null and b/docs/public/features/oxc/lint-detail.png differ diff --git a/docs/public/features/oxc/lint-list.png b/docs/public/features/oxc/lint-list.png new file mode 100644 index 000000000..f7876628d Binary files /dev/null and b/docs/public/features/oxc/lint-list.png differ diff --git a/docs/public/features/oxc/overview.png b/docs/public/features/oxc/overview.png new file mode 100644 index 000000000..9ca7f8267 Binary files /dev/null and b/docs/public/features/oxc/overview.png differ