Skip to content

fix(migrate): strip ESLint flags that Oxlint rejects from scripts - #3572

Merged
fengmk2 merged 10 commits into
voidzero-dev:mainfrom
jong-kyung:fix/migrate-eslint-script-flags
Nov 25, 2026
Merged

fengmk2 merged 10 commits into
voidzero-dev:mainfrom
jong-kyung:fix/migrate-eslint-script-flags

Conversation

@jong-kyung

@jong-kyung jong-kyung commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

vp migrate kept ESLint flags that Oxlint rejects when it rewrote eslint scripts, so the migrated script failed. For example, eslint --cache --cache-location .cache/eslint . became vp lint --cache-location .cache/eslint ., which Oxlint rejects.

This PR strips the following flags:

  • -o
  • --cache-location, --cache-file, --cache-strategy
  • --concurrency
  • --color, --no-color, --stats
  • --exit-on-fatal-error, --pass-on-unpruned-suppressions

It also stops stripping --no-error-on-unmatched-pattern. Oxlint supports this flag with the same meaning, and without it vp lint fails when every passed file is ignored. For the same reason, --no-warn-ignored becomes --no-error-on-unmatched-pattern, so a lint-staged task whose staged files are all ignored still succeeds.

Flags whose removal would change what the script checks or fixes stay, so the script fails with a clear error instead. These include -c, --config, --rule, --global, --no-config-lookup, and --flag, because migration only converts the default config and does not carry command-line options into it. Run-mode flags such as --stdin, --print-config, and --suppress-rule also stay, along with --fix-type, --pass-on-no-patterns, --report-unused-inline-configs, and --suppressions-location.

Script rewriting kept ESLint flags that Oxlint rejects, such as --cache-location and -o, and kept -c and --config pointing at the ESLint config that migration deletes. The migrated lint script then failed. Strip these flags when the script still means a lint run. Flags that change the run mode, such as --stdin and --print-config, stay so the script fails loudly instead of silently linting everything.
@jong-kyung jong-kyung self-assigned this Nov 25, 2026
@jong-kyung jong-kyung added test: e2e Auto run e2e tests test: create-e2e Run `vp create` e2e tests labels Nov 25, 2026
@jong-kyung

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T04:45:18.473456Z 0bca50e Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 288d5aeb74

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/vp_migration/src/eslint.rs Resolved
Comment thread crates/vp_migration/src/eslint.rs Resolved
Stripping --pass-on-no-patterns turns an empty file list into a whole-project vp lint --fix, and stripping --fix-type widens the applied fixes. Keep both so the migrated script fails loudly instead.
@jong-kyung

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6f6044d01e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/vp_migration/src/eslint.rs Resolved
Comment thread crates/vp_migration/src/eslint.rs Resolved
Migration converts only the default ESLint config and never carries per-command --rule overrides, so stripping -c, --config, or --rule could silently change which checks run. Keep them so the migrated script fails loudly instead.
@jong-kyung

Copy link
Copy Markdown
Collaborator Author

@codex review

Oxlint supports the flag with the same meaning. Stripping it made vp lint fail with "No files found to lint" when every passed file is ignored, such as a lint-staged run that only touches ignored files.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 05e19a477b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/vp_migration/src/eslint.rs Resolved
Comment thread crates/vp_migration/src/eslint.rs Resolved
Stripping --no-config-lookup, --global, --report-unused-inline-configs, --suppress-rule, or --suppressions-location could silently change which checks run or what --fix applies, because migration does not carry these options into the config. Keep them so the migrated script fails loudly instead.
@jong-kyung

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0723be4c52

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/vp_migration/src/eslint.rs Resolved
…ttern

ESLint only warns about ignored files, so scripts such as lint-staged tasks pass --no-warn-ignored to succeed when every staged file is ignored. Oxlint skips ignored files silently but fails when nothing is left to lint, so convert the flag to --no-error-on-unmatched-pattern to keep that success.
@jong-kyung

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d45f87114f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/vp_migration/src/eslint.rs Resolved
@jong-kyung
jong-kyung marked this pull request as ready for review November 25, 2026 04:29

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 281e8fd0b6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/vp_migration/src/eslint.rs Resolved
Feature flags such as v10_config_lookup_from_file change which config applies to each file, and migration does not carry that behavior over. Keep --flag so the migrated script fails loudly instead of silently dropping nested config rules.
@jong-kyung

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 0bca50e297

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@fengmk2
fengmk2 merged commit 45aa700 into voidzero-dev:main Nov 25, 2026
150 of 152 checks passed
@jong-kyung
jong-kyung deleted the fix/migrate-eslint-script-flags branch November 25, 2026 06:55
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.

3 participants