Skip to content

fix(check): do not treat lint warnings as errors in exit code#1268

Merged
fengmk2 merged 2 commits intomainfrom
fix/check-lint-warnings-exit-code
Apr 2, 2026
Merged

fix(check): do not treat lint warnings as errors in exit code#1268
fengmk2 merged 2 commits intomainfrom
fix/check-lint-warnings-exit-code

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Apr 2, 2026

When oxlint reports only warnings (0 errors), override the raw exit code
to SUCCESS instead of propagating oxlint's non-zero exit code. This
fixes ecosystem-ci failures where type-aware lint rules (e.g.
typescript-eslint/await-thenable) produce warnings that cause
vp check --fix to exit with code 1.

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 2, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit b24b527
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69ce08da67af27000828a526

@fengmk2 fengmk2 self-assigned this Apr 2, 2026
Copy link
Copy Markdown
Member Author

fengmk2 commented Apr 2, 2026


How to use the Graphite Merge Queue

Add the label auto-merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@fengmk2 fengmk2 added the test: e2e Auto run e2e tests label Apr 2, 2026 — with Graphite App
fengmk2 added 2 commits April 2, 2026 14:11
When oxlint reports only warnings (0 errors), override the raw exit code
to SUCCESS instead of propagating oxlint's non-zero exit code. This
fixes ecosystem-ci failures where type-aware lint rules (e.g.
typescript-eslint/await-thenable) produce warnings that cause
`vp check --fix` to exit with code 1.
… snap test

Verify that a plain `vp check` also exits with code 0 when only
warnings are present, matching the --fix behavior.
@fengmk2 fengmk2 force-pushed the fix/check-lint-warnings-exit-code branch from 391f785 to b24b527 Compare April 2, 2026 06:12
@fengmk2 fengmk2 marked this pull request as ready for review April 2, 2026 07:12
@fengmk2 fengmk2 requested review from branchseer and cpojer April 2, 2026 07:12
Copy link
Copy Markdown
Member

@cpojer cpojer left a comment

Choose a reason for hiding this comment

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

Should this maybe also be fixed upstream in Oxlint?

@fengmk2
Copy link
Copy Markdown
Member Author

fengmk2 commented Apr 2, 2026

@cpojer This is a bug in vp check. oxlint's warnings exit with error code 0, but our logic made warning logs exit with non-zero error codes as well. 😭

@fengmk2
Copy link
Copy Markdown
Member Author

fengmk2 commented Apr 2, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

ℹ️ 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 79c6074 into main Apr 2, 2026
68 checks passed
@fengmk2 fengmk2 deleted the fix/check-lint-warnings-exit-code branch April 2, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test: e2e Auto run e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants