Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4f71f56
fix(oxc): start standalone dev server directly
yuyinws Jul 16, 2026
8ed9bdc
refactor(oxc): remove lint log cli
yuyinws Jul 16, 2026
54aef9f
refactor(oxc): use cac for cli
yuyinws Jul 16, 2026
526adf2
chore: clean code
yuyinws Jul 16, 2026
1163c49
feat: reorganize page structure
yuyinws Jul 17, 2026
4583b98
feat: lint inspector
yuyinws Jul 17, 2026
3195a68
chore: revert
yuyinws Jul 18, 2026
d4ab76a
refactor(ui): share date group utility
yuyinws Jul 18, 2026
bbf1291
feat: imporve ui
yuyinws Jul 18, 2026
eea4c76
Merge remote-tracking branch 'origin/main' into chore/clean-code
yuyinws Jul 18, 2026
0b2f102
refactor(oxc): migrate to UnoCSS class syntax
yuyinws Jul 18, 2026
9662e4d
fix: style
yuyinws Jul 18, 2026
852b966
chore: update playground
yuyinws Jul 18, 2026
5edee0b
feat(oxc): add lint result layout switcher
yuyinws Jul 18, 2026
dfcd0aa
chore: clean code
yuyinws Jul 18, 2026
d49804b
feat(oxc): add local lint fixtures
yuyinws Jul 18, 2026
f4dae5b
chore: fix lint error
yuyinws Jul 18, 2026
f3613d5
refactor(oxc): delegate standalone CLI to devframe
yuyinws Jul 18, 2026
63c0e65
fix(ui): classify package module IDs
yuyinws Jul 18, 2026
6387061
fix: type check
yuyinws Jul 18, 2026
cd9c839
refactor(oxc): make oxlint run portable
yuyinws Jul 18, 2026
db5a6c7
chore: remove dev port
yuyinws Jul 19, 2026
9b70fdf
chore: remove code
yuyinws Jul 19, 2026
15632c0
feat(oxc): adapter vite-plus
yuyinws Jul 21, 2026
24d02a7
chore(oxc): disable config inspector
yuyinws Jul 21, 2026
fbd8e24
Merge remote-tracking branch 'origin/main' into chore/clean-code
antfubot Jul 21, 2026
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
19 changes: 19 additions & 0 deletions docs/errors/OXDT0001.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
outline: deep
---
# OXDT0001: Failed to Create Lint Result

## Message
> Failed to create a lint result: `{reason}`

## Cause
Oxlint could not start, its output could not be parsed, or the lint result could not be written to the project directory.

## Example
Clicking `Run Lint` when oxlint is not installed in the project.

## Fix
Ensure oxlint is installed, its configuration is valid, and the project directory is writable.

## Source
- [`packages/oxc/src/node/rpc/functions/oxlint-run.ts`](https://github.com/vitejs/devtools/blob/main/packages/oxc/src/node/rpc/functions/oxlint-run.ts) — Runs oxlint and saves the lint result.
19 changes: 19 additions & 0 deletions docs/errors/OXDT0002.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
outline: deep
---
# OXDT0002: Invalid Lint Result ID

## Message
> Invalid lint result ID "`{resultId}`".

## Cause
A non-numeric ID was provided when reading or deleting a lint result.

## Example
Passing `../other-directory` as the result ID in an RPC call.

## Fix
Use a numeric ID shown in the lint result list.

## Source
- [`packages/oxc/src/node/utils/lint-results-manager.ts`](https://github.com/vitejs/devtools/blob/main/packages/oxc/src/node/utils/lint-results-manager.ts) — Validates the result ID before file operations.
19 changes: 19 additions & 0 deletions docs/errors/OXDT0003.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
outline: deep
---
# OXDT0003: Failed to Delete Lint Result

## Message
> Failed to delete lint result "`{resultId}`": `{reason}`

## Cause
The lint result does not exist, or the project directory does not allow the file to be deleted.

## Example
Deleting a lint result that another process has already removed.

## Fix
Refresh the lint result list and ensure the project directory is writable.

## Source
- [`packages/oxc/src/node/rpc/functions/oxlint-delete-result.ts`](https://github.com/vitejs/devtools/blob/main/packages/oxc/src/node/rpc/functions/oxlint-delete-result.ts) — Deletes the local lint result.
10 changes: 10 additions & 0 deletions docs/errors/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,13 @@ Emitted by `@vitejs/devtools-vitest`.
|------|-------|-------|
| [VTDT0001](./VTDT0001) | error | Vitest UI Install Failed |
| [VTDT0002](./VTDT0002) | error | Vitest UI Server Unreachable |

## Oxc DevTools (OXDT)

Emitted by `@vitejs/devtools-oxc`.

| Code | Level | Title |
|------|-------|-------|
| [OXDT0001](./OXDT0001) | error | Failed to Create Lint Result |
| [OXDT0002](./OXDT0002) | error | Invalid Lint Result ID |
| [OXDT0003](./OXDT0003) | error | Failed to Delete Lint Result |
2 changes: 1 addition & 1 deletion docs/oxc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ export default defineConfig({
})
```

It also runs standalone from the CLI — generate lint logs with `npx @vitejs/devtools-oxc lint`, then launch the UI with `npx @vitejs/devtools-oxc`.
It also runs standalone from the CLI with `npx @vitejs/devtools-oxc`.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"watch": "pnpm -r run watch",
"dev:rolldown": "pnpm -C packages/rolldown run dev",
"dev:vite": "pnpm -C packages/vite run dev",
"dev:oxc": "pnpm -C packages/oxc run dev",
"docs": "pnpm -C docs run docs",
"docs:build": "pnpm build && pnpm -C docs run docs:build",
"docs:serve": "pnpm -C docs run docs:serve",
Expand Down
File renamed without changes.
8 changes: 8 additions & 0 deletions packages/core/playground/src/oxlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { defineConfig } from 'oxlint'

export default defineConfig({
plugins: ['typescript', 'vue', 'oxc'],
rules: {
'no-console': 'error',
},
})
8 changes: 0 additions & 8 deletions packages/oxc/.oxfmtrc.json

This file was deleted.

76 changes: 1 addition & 75 deletions packages/oxc/README.md
Original file line number Diff line number Diff line change
@@ -1,75 +1 @@
<p align='center'>
<img width="600" src="https://cdn.jsdelivr.net/gh/yuyinws/static@master/2026/02/upgit_20260226_1772089231.png" >
</p>

<p align='center'>
Inspect and understand the Oxc toolchain with ease.
</p>

<p align='center'>
The first-party <code>@vitejs/devtools-oxc</code> package, donated to Vite DevTools from <a href="https://github.com/yuyinws/oxc-inspector">yuyinws/oxc-inspector</a> by <a href="https://github.com/yuyinws">Leo</a>. The standalone <code>oxc-inspector</code> package is deprecated in favor of this one.
</p>

## ✨ Features

- **Easy to use**: Launch from the CLI or integrate with [Vite Devtools](https://github.com/vitejs/devtools)

- **Visualize lint output**: Inspect lint output in an intuitive interface

- **Config helper**: Easier to understand oxlint and oxfmt config file

## 📷 Snapshots

![CleanShot 2026-02-26 at 15.58.11@2x](https://cdn.jsdelivr.net/gh/yuyinws/static@master/2026/02/upgit_20260226_1772092928.png)

![CleanShot 2026-02-26 at 15.59.26@2x](https://cdn.jsdelivr.net/gh/yuyinws/static@master/2026/02/upgit_20260226_1772092944.png)

![CleanShot 2026-02-26 at 16.00.25@2x](https://cdn.jsdelivr.net/gh/yuyinws/static@master/2026/02/upgit_20260226_1772092955.png)

## 🚀 Usage

### Install

```sh
npm install -D @vitejs/devtools-oxc

pnpm add -D @vitejs/devtools-oxc

yarn add -D @vitejs/devtools-oxc

bun add -D @vitejs/devtools-oxc
```

### Generate lint logs

```sh
npx @vitejs/devtools-oxc lint
```

### Launch UI

```sh
npx @vitejs/devtools-oxc
```

### Integrate Vite Devtools

```ts
// vite.config.ts
import { DevTools } from '@vitejs/devtools'
import { defineConfig } from 'vite'
import { DevToolsOxc } from '@vitejs/devtools-oxc/vite'

export default defineConfig({
plugins: [DevTools(), DevToolsOxc()],
build: {
rolldownOptions: {
devtools: {}, // enable devtools mode
},
},
})
```

## License

[MIT](./LICENSE) License © 2025-PRESENT [Leo](https://github.com/yuyinws)
## Oxc Devtools
9 changes: 9 additions & 0 deletions packages/oxc/oxfmt.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from 'oxfmt'

export default defineConfig({
semi: false,
singleQuote: true,
arrowParens: 'avoid',
quoteProps: 'consistent',
experimentalSortPackageJson: false,
})
26 changes: 26 additions & 0 deletions packages/oxc/oxlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { defineConfig } from 'oxlint'

export default defineConfig({
plugins: ['unicorn', 'typescript', 'oxc', 'vue', 'vitest'],
categories: {
correctness: 'error',
suspicious: 'warn',
perf: 'warn',
},
rules: {
'no-console': 'off',
'no-await-in-loop': 'off',
'unicorn/no-array-sort': 'off',
'no-restricted-globals': 'error',
'typescript/consistent-type-imports': 'off',
},
ignorePatterns: [
'.output/**',
'.data/**',
'.nuxt/**',
'.nitro/**',
'.cache/**',
'dist/**',
'node_modules/**',
],
})
9 changes: 4 additions & 5 deletions packages/oxc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,17 @@
"build": "pnpm dev:prepare && nuxi build src && tsdown",
"dev": "nuxi dev src",
"dev:prepare": "nuxi prepare src",
"lint": "oxlint && oxfmt --check",
"lint:fix": "oxlint --fix && oxfmt",
"lint": "oxlint --ignore-pattern 'src/app/fixtures/**' && oxfmt --check . '!src/app/fixtures/**'",
"lint:fix": "oxlint --fix --ignore-pattern 'src/app/fixtures/**' && oxfmt . '!src/app/fixtures/**'",
"play": "pnpm -C playground dev",
"prepack": "pnpm build",
"typecheck": "vue-tsc --noEmit"
},
"dependencies": {
"@clack/prompts": "catalog:inlined",
"@vitejs/devtools-kit": "workspace:*",
"ansis": "catalog:deps",
"cac": "catalog:deps",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am actually ok with keeping gunshi for a bit of diversity

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cac is more lightweight than gunshi. Given that the current CLI is relatively simple, I think it's a better fit for now. We can consider switching to gunshi if the CLI grows more complex in the future.

"devframe": "catalog:deps",
"gunshi": "catalog:deps",
"local-pkg": "catalog:deps",
"nostics": "catalog:deps",
"pathe": "catalog:deps",
"tinyexec": "catalog:deps"
Expand Down
25 changes: 0 additions & 25 deletions packages/oxc/playground/.oxlintrc.json

This file was deleted.

13 changes: 0 additions & 13 deletions packages/oxc/playground/index.html

This file was deleted.

10 changes: 0 additions & 10 deletions packages/oxc/playground/package.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/oxc/playground/public/vite.svg

This file was deleted.

9 changes: 0 additions & 9 deletions packages/oxc/playground/src/counter.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/oxc/playground/src/javascript.svg

This file was deleted.

24 changes: 0 additions & 24 deletions packages/oxc/playground/src/main.js

This file was deleted.

Loading
Loading