Skip to content

refactor(cli): use native lint and fmt config discovery - #2731

Draft
fengmk2 wants to merge 3 commits into
mainfrom
refactor/oxc-config-auto-discovery
Draft

fengmk2 wants to merge 3 commits into
mainfrom
refactor/oxc-config-auto-discovery

Conversation

@fengmk2

@fengmk2 fengmk2 commented Sep 17, 2026

Copy link
Copy Markdown
Member

Oxlint and Oxfmt now discover vite.config.ts. Remove the extra config load and automatic -c argument from the shared command resolver.

vp lint, vp fmt, and vp check use native config discovery. Commands run from a package directory can use that package's config. Explicit -c and --config arguments still take precedence.

Keep --disable-nested-config by default to prevent nested configs from changing settings for individual files.

Auto-discovery currently supports only vite.config.ts. Support for .js, .mjs, .cjs, .mts, and .cts needs upstream changes before this PR can merge.

@fengmk2 fengmk2 self-assigned this Sep 17, 2026
@github-actions

github-actions Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

✅ Staging deployment successful!

Preview: https://viteplus-staging.void.app/
Commit: 43102d9

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 17, 2026

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://refactor-oxc-config-auto-discovery-viteplus-dev.voidzero-docs.workers.dev (commit 43102d9)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://d0978c77-viteplus-dev.voidzero-docs.workers.dev 43102d9 2026-09-17T06:58:14.578Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://3c332245-viteplus-dev.voidzero-docs.workers.dev 577e32f 2026-09-17T05:46:05.781Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://889369cc-viteplus-dev.voidzero-docs.workers.dev 1af1d78 2026-09-17T05:26:00.958Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://6204f783-viteplus-dev.voidzero-docs.workers.dev d579500 2026-09-17T05:23:53.992Z Visit the dashboard ↗

@fengmk2
fengmk2 force-pushed the refactor/oxc-config-auto-discovery branch from d579500 to 1af1d78 Compare September 17, 2026 05:24
@github-actions

github-actions Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

CLI artifact sizes (43102d9)

Final release artifacts built by the canonical build-upstream and build-windows-cli actions.
The dist rows use the Linux build. The core total excludes .node files to match the release artifact.

Artifact Format Base PR Change
packages/cli/dist Directory total 2.15 MiB 2.15 MiB 0 B (0.00%)
packages/core/dist Directory total 3.95 MiB 3.95 MiB 0 B (0.00%)
Combined package dist Directory total 6.09 MiB 6.09 MiB 0 B (0.00%)
vp (Linux x64) Binary 11.18 MiB 11.18 MiB 0 B (0.00%)
vp (Linux x64) gzip -9 4.84 MiB 4.84 MiB 0 B (0.00%)
NAPI (Linux x64) Binary 32.01 MiB 32.01 MiB -4.00 KiB (-0.01%)
NAPI (Linux x64) gzip -9 12.69 MiB 12.69 MiB -1.98 KiB (-0.02%)
vp (macOS ARM64) Binary 8.33 MiB 8.33 MiB 0 B (0.00%)
vp (macOS ARM64) gzip -9 4.22 MiB 4.22 MiB 0 B (0.00%)
NAPI (macOS ARM64) Binary 39.64 MiB 39.64 MiB -16 B (-0.00%)
NAPI (macOS ARM64) gzip -9 17.01 MiB 17.01 MiB -756 B (-0.00%)
vp (Windows x64) Binary 9.06 MiB 9.06 MiB 0 B (0.00%)
vp (Windows x64) gzip -9 3.96 MiB 3.96 MiB 0 B (0.00%)
NAPI (Windows x64) Binary 26.98 MiB 26.98 MiB -2.50 KiB (-0.01%)
NAPI (Windows x64) gzip -9 10.80 MiB 10.80 MiB -2.81 KiB (-0.03%)
Trampoline (Windows x64) Binary 13.50 KiB 13.50 KiB 0 B (0.00%)
Trampoline (Windows x64) gzip -9 7.03 KiB 7.03 KiB +1 B (+0.01%)
Installer (Windows x64) Binary 4.53 MiB 4.53 MiB 0 B (0.00%)
Installer (Windows x64) gzip -9 2.12 MiB 2.12 MiB 0 B (0.00%)

@fengmk2

fengmk2 commented Sep 17, 2026

Copy link
Copy Markdown
Member Author

Wait for oxlint|fmt to support vite.config.* extensions.

@leaysgur If you have time, you can review this change in advance to see whether it meets your expectations.

@fengmk2 fengmk2 added test: e2e Auto run e2e tests test: create-e2e Run `vp create` e2e tests labels Sep 17, 2026
@leaysgur

leaysgur commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

NOTE:

Automatic discovery should apply the lint block in vite.config.js.

```
Found 0 warnings and 0 errors.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Should fails here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test: create-e2e Run `vp create` e2e tests test: e2e Auto run e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants