Skip to content

feat(lint): add pnpm vite alias oxlint rule#1736

Draft
fengmk2 wants to merge 1 commit into
mainfrom
codex/pnpm-vite-alias-oxlint-rule
Draft

feat(lint): add pnpm vite alias oxlint rule#1736
fengmk2 wants to merge 1 commit into
mainfrom
codex/pnpm-vite-alias-oxlint-rule

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Jun 1, 2026

Summary

  • Add vite-plus/require-pnpm-vite-alias to the Vite+ Oxlint plugin.
  • Enable the new rule in generated/default Vite+ lint configs.
  • Update generated-config snapshots to include the new default rule.

Why

PR #1728 fixed a pnpm monorepo issue where removing the direct aliased vite dependency from an application package made the workspace override appear ineffective. This lint rule catches that class of configuration drift in Vite+ application packages.

Validation

  • pnpm exec tsc --noEmit --pretty false
  • vp fmt --check packages/cli/src/oxlint-plugin.ts packages/cli/src/oxlint-plugin-config.ts packages/cli/src/__tests__/oxlint-plugin.spec.ts
  • vp lint packages/cli/src/oxlint-plugin.ts packages/cli/src/oxlint-plugin-config.ts packages/cli/src/__tests__/oxlint-plugin.spec.ts
  • vp test packages/cli/src/__tests__/oxlint-plugin.spec.ts
  • git diff --check

Note: pnpm -F vite-plus snap-test-global new-vite-monorepo was skipped on Windows by the snap-test runner.

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 1, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 526bf1b
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a1d5b587b986f00081faa6a

@fengmk2 fengmk2 self-assigned this Jun 1, 2026
@fengmk2 fengmk2 changed the title [codex] add pnpm vite alias oxlint rule feat(lint): add pnpm vite alias oxlint rule Jun 1, 2026
@fengmk2 fengmk2 force-pushed the codex/pnpm-vite-alias-oxlint-rule branch from bc77362 to 81c7565 Compare June 1, 2026 09:18
Comment thread packages/cli/src/oxlint-plugin.ts Outdated
@fengmk2 fengmk2 force-pushed the codex/pnpm-vite-alias-oxlint-rule branch from 81c7565 to 76d3a9d Compare June 1, 2026 09:26
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

✅ Staging deployment successful!

Preview: https://viteplus-staging.void.app/
Commit: 526bf1b

@fengmk2 fengmk2 force-pushed the codex/pnpm-vite-alias-oxlint-rule branch 3 times, most recently from c352ce0 to 0d2d55d Compare June 1, 2026 10:06
@@ -0,0 +1,21 @@
[1]> vp lint --format default apps/website/vite.config.ts # should fail when a pnpm Vite+ app is missing the direct vite alias
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.

vp lint --fix should be better?

@fengmk2 fengmk2 force-pushed the codex/pnpm-vite-alias-oxlint-rule branch from 0d2d55d to cdab1ec Compare June 1, 2026 10:10
@fengmk2 fengmk2 force-pushed the codex/pnpm-vite-alias-oxlint-rule branch from cdab1ec to 526bf1b Compare June 1, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant