fix(oxlint): fix vitest/no-conditional-expect violations - #3787
Conversation
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
|
@scaleway/auth-scw
@scaleway/changesets-renovate
@scaleway/fuzzy-search
@scaleway/oxfmt-config
@scaleway/oxlint-config
@scaleway/phonenumber
@scaleway/random-name
@scaleway/regex
@scaleway/scouter
@scaleway/sync-peer-deps
@scaleway/tsconfig
@scaleway/types
@scaleway/units
@scaleway/use-analytics
@scaleway/use-clipboard
@scaleway/use-countdown
@scaleway/use-dataloader
@scaleway/use-growthbook
@scaleway/use-i18n
@scaleway/use-interval
@scaleway/use-random-name
@scaleway/use-storage
@scaleway/use-visual-persistence
@scaleway/validate-icu-locales
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
Closes #3772
Summary
Fix all
vitest/no-conditional-expectviolations across the codebase and remove the rule fromoxlint.config.ts.Changes
packages/validate-icu-locales/src/__tests__/validate-icu-locales.test.tsthat usedtry/catchwithexpectinsidecatchblocks. Replaced with.catch()pattern so allexpect()calls are unconditional.'vitest/no-conditional-expect': 'warn'fromoxlint.config.ts.Verification
pnpm lint— nono-conditional-expectwarningspnpm typecheck— passes