Skip to content

v3.3.4

  • v3.3.4
  • a87223a
  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
  • Choose a tag to compare

  • v3.3.4
  • a87223a
  • Choose a tag to compare

  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
@howells howells tagged this 17 Sep 08:49
`vitest/prefer-to-be-truthy` and `vitest/prefer-to-be-falsy` carry
autofixes that turn `toBe(true)` into `toBeTruthy()` and `toBe(false)`
into `toBeFalsy()`. Those are different assertions: `toBe(true)` fails
on the string "yes" and on 1, and `toBeTruthy()` passes both. A test
that pinned an exact boolean came out of `howells-fix` accepting
anything truthy.

Consumers run `howells-fix` from a pre-commit hook, so the rewrite
landed in commits nobody reviewed - 276 assertions in colorscope, 121 in
motif, one of which broke an env test. Severity was no defence: motif
had both rules at "warn" and its tests were rewritten anyway. Oxlint
classes both fixes as safe, so `--fix` applies them and only
`--fix-dangerously` is gated, which leaves turning the rules off as the
only lever.

The test asserts the fixer's output rather than the rule table, so a
later Ultracite bump cannot reintroduce this quietly. Verified it fails
with the rules restored and passes with them off.

Claude-Session: https://claude.ai/code/session_017Rdgjet8jgD4Fc6hLs5bjm
Assets 2
Loading