Repository navigation
fix(migrate): strip ESLint flags that Oxlint rejects from scripts - #3572
Conversation
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.
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
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.
|
@codex review |
There was a problem hiding this comment.
💡 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".
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.
|
@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.
There was a problem hiding this comment.
💡 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".
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.
|
@codex review |
There was a problem hiding this comment.
💡 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".
…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.
|
@codex review |
There was a problem hiding this comment.
💡 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".
There was a problem hiding this comment.
💡 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".
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.
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
vp migratekept ESLint flags that Oxlint rejects when it rewroteeslintscripts, so the migrated script failed. For example,eslint --cache --cache-location .cache/eslint .becamevp 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-suppressionsIt also stops stripping
--no-error-on-unmatched-pattern. Oxlint supports this flag with the same meaning, and without itvp lintfails when every passed file is ignored. For the same reason,--no-warn-ignoredbecomes--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-rulealso stay, along with--fix-type,--pass-on-no-patterns,--report-unused-inline-configs, and--suppressions-location.