Skip to content

fix(oxlint): fix vitest/no-conditional-expect violations - #3787

Open
philibea wants to merge 1 commit into
mainfrom
fix/oxlint_3772
Open

fix(oxlint): fix vitest/no-conditional-expect violations#3787
philibea wants to merge 1 commit into
mainfrom
fix/oxlint_3772

Conversation

@philibea

@philibea philibea commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Closes #3772

Summary

Fix all vitest/no-conditional-expect violations across the codebase and remove the rule from oxlint.config.ts.

Changes

  • Restructured 5 tests in packages/validate-icu-locales/src/__tests__/validate-icu-locales.test.ts that used try/catch with expect inside catch blocks. Replaced with .catch() pattern so all expect() calls are unconditional.
  • Removed 'vitest/no-conditional-expect': 'warn' from oxlint.config.ts.

Verification

  • pnpm lint — no no-conditional-expect warnings
  • pnpm typecheck — passes

Restructure try/catch tests in validate-icu-locales to use .catch()
pattern, making all expect() calls unconditional. Remove the rule from
oxlint.config.ts.

Closes #3772
@philibea philibea added AI generated Generated by AI lint Oxlint rule cleanup labels Sep 4, 2026
@changeset-bot

changeset-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e6fb3e5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Sep 4, 2026

Copy link
Copy Markdown

Open in StackBlitz

@scaleway/auth-scw

npm i https://pkg.pr.new/@scaleway/auth-scw@e6fb3e5

@scaleway/changesets-renovate

npm i https://pkg.pr.new/@scaleway/changesets-renovate@e6fb3e5

@scaleway/fuzzy-search

npm i https://pkg.pr.new/@scaleway/fuzzy-search@e6fb3e5

@scaleway/oxfmt-config

npm i https://pkg.pr.new/@scaleway/oxfmt-config@e6fb3e5

@scaleway/oxlint-config

npm i https://pkg.pr.new/@scaleway/oxlint-config@e6fb3e5

@scaleway/phonenumber

npm i https://pkg.pr.new/@scaleway/phonenumber@e6fb3e5

@scaleway/random-name

npm i https://pkg.pr.new/@scaleway/random-name@e6fb3e5

@scaleway/regex

npm i https://pkg.pr.new/@scaleway/regex@e6fb3e5

@scaleway/scouter

npm i https://pkg.pr.new/@scaleway/scouter@e6fb3e5

@scaleway/sync-peer-deps

npm i https://pkg.pr.new/@scaleway/sync-peer-deps@e6fb3e5

@scaleway/tsconfig

npm i https://pkg.pr.new/@scaleway/tsconfig@e6fb3e5

@scaleway/types

npm i https://pkg.pr.new/@scaleway/types@e6fb3e5

@scaleway/units

npm i https://pkg.pr.new/@scaleway/units@e6fb3e5

@scaleway/use-analytics

npm i https://pkg.pr.new/@scaleway/use-analytics@e6fb3e5

@scaleway/use-clipboard

npm i https://pkg.pr.new/@scaleway/use-clipboard@e6fb3e5

@scaleway/use-countdown

npm i https://pkg.pr.new/@scaleway/use-countdown@e6fb3e5

@scaleway/use-dataloader

npm i https://pkg.pr.new/@scaleway/use-dataloader@e6fb3e5

@scaleway/use-growthbook

npm i https://pkg.pr.new/@scaleway/use-growthbook@e6fb3e5

@scaleway/use-i18n

npm i https://pkg.pr.new/@scaleway/use-i18n@e6fb3e5

@scaleway/use-interval

npm i https://pkg.pr.new/@scaleway/use-interval@e6fb3e5

@scaleway/use-random-name

npm i https://pkg.pr.new/@scaleway/use-random-name@e6fb3e5

@scaleway/use-storage

npm i https://pkg.pr.new/@scaleway/use-storage@e6fb3e5

@scaleway/use-visual-persistence

npm i https://pkg.pr.new/@scaleway/use-visual-persistence@e6fb3e5

@scaleway/validate-icu-locales

npm i https://pkg.pr.new/@scaleway/validate-icu-locales@e6fb3e5

commit: e6fb3e5

@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.81%. Comparing base (7952e74) to head (e6fb3e5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3787   +/-   ##
=======================================
  Coverage   93.81%   93.81%           
=======================================
  Files          81       81           
  Lines        1794     1794           
  Branches      408      413    +5     
=======================================
  Hits         1683     1683           
  Misses        111      111           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@philibea
philibea requested a review from chambo-e September 4, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI generated Generated by AI lint Oxlint rule cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[oxlint] Fix vitest/no-conditional-expect violations

1 participant