Commit dfeea9d
chore: adopt Vite+ (vp) for the JS toolchain (#417)
## Summary
Adopt Vite+ (`vp`) as this repo's JavaScript toolchain, so the project
behind `vp run` dogfoods Vite+ for its own formatting and git hooks.
This replaces the root `oxfmt` + `husky` + `lint-staged` setup with `vp`
and consolidates tool config into `vite.config.ts`.
## Changes
- **Formatting**: remove the root `oxfmt` dependency and
`.oxfmtrc.json`; format with `vp fmt` (config moved into the `fmt` block
of `vite.config.ts`). CI now runs `pnpm exec vp fmt --check`.
- **Git hooks**: replace `husky` + `lint-staged` with `vp config`
(`.vite-hooks/`) and a `staged` block that runs `vp check --fix` (plus
`cargo fmt` for Rust files).
- **Lint**: add a `lint` block with `ignorePatterns` for `playground/**`
and `**/fixtures/**`, so type-aware checks skip the nested playground
workspace and the intentionally-incomplete test fixtures.
- **Catalog**: route `vite`/`vitest` to the Vite+ forks
(`@voidzero-dev/vite-plus-core` / `-test`), pinned to `^0.1.23`.
## Notable decisions
- **`packages/tools` stays on standalone
`oxlint`/`oxfmt`/`oxlint-tsgolint`.** The `fspy` suite
(`crates/fspy/tests/oxlint.rs`) traces those real binaries' filesystem
access; the Vite+ `oxlint`/`oxfmt` bins are IDE/LSP wrappers and would
break the tests.
- **Root gains direct `vite`/`vitest` devDeps** so the catalog override
has a dependency to bind to. Otherwise the only `vite` reference is a
peer that pnpm satisfies with upstream vite, leaving the override a
no-op.
## Verification
`vp check`, `vp fmt --check`, and `pnpm dedupe --check` pass locally;
full CI is green (format, clippy, and all test shards including the
`fspy` oxlint tests).
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Charles Wang <3612422+wan9chi@users.noreply.github.com>1 parent 8bf5df2 commit dfeea9d
12 files changed
Lines changed: 987 additions & 308 deletions
File tree
- .github/workflows
- .husky
- .vite-hooks
- packages/tools
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
| 265 | + | |
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| |||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
24 | 17 | | |
25 | 18 | | |
26 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
0 commit comments