Skip to content

fix(migrate): duplicate oxlint config arguments - #2671

Closed
yusuke99 wants to merge 4 commits into
voidzero-dev:mainfrom
yusuke99:fix/migrate-oxlint-arg-error
Closed

fix(migrate): duplicate oxlint config arguments#2671
yusuke99 wants to merge 4 commits into
voidzero-dev:mainfrom
yusuke99:fix/migrate-oxlint-arg-error

Conversation

@yusuke99

Copy link
Copy Markdown
Contributor

Part of #2037:

vp lint -c rejects duplicate flag — generated command runs vp lint -c .oxlintrc.json and fails with Error: argument '-c' cannot be used multiple times in this context.
pdfme (log)

Summary

This PR fixes vp lint failing with argument '-c' cannot be used multiple times in this context after running vp migrate.

Currently, vp migrate rewrites an Oxlint script such as oxlint -c .oxlintrc.json to vp lint -c .oxlintrc.json, even though .oxlintrc.json has been merged into vite.config.ts. When the lint command runs, Vite+ also passes -c vite.config.ts to Oxlint, resulting in duplicate config arguments.

What’s changed

Capture the detected Oxlint config and remove -c or --config arguments when its merged into vite.config.ts — which makes the following changes when running vp migrate:

  • Before: oxlint -c .oxlintrc.jsonvp lint -c .oxlintrc.json
  • After: oxlint -c .oxlintrc.jsonvp lint

Note

Since only .oxlintrc.json and .oxlintrc.jsonc are automatically merged into vite.config.ts, explicit -c or --config for custom file is preserved and passed directly to Oxlint.

e.g.) oxlint -c .my-custom-oxlint.config.jsonvp lint -c .my-custom-oxlint.config.json

@fengmk2

fengmk2 commented Sep 11, 2026

Copy link
Copy Markdown
Member

@yusuke99 This feature can be postponed for now. We prefer that Vite+ projects still be configured in vite.config.ts.

@fengmk2 fengmk2 closed this Sep 11, 2026
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.

2 participants