Skip to content

refactor: effect/use-clock-service to zero - #601

Merged
thomasfosterau merged 1 commit into
trunkfrom
lint-use-clock-service
Nov 12, 2026
Merged

thomasfosterau merged 1 commit into
trunkfrom
lint-use-clock-service

Conversation

@thomasfosterau

Copy link
Copy Markdown
Owner

Summary

Part of #533. effect/use-clock-service goes from 72 sites to 0 and its warn line is removed from vite.config.ts, so the preset's error applies. Every site was new Date(...) / Date.parse in example handlers, example tests, unit tests and one type test; each now builds its value through DateTime (DateTime.toDateUtc(DateTime.makeUnsafe(...)) for fixed instants, DateTime.nowUnsafe() for "now", DateTime.toEpochMillis for the parse). No src/ code changed. No disable comments or overrides.

Rule deltas from vp lint: effect(use-clock-service) 72 -> 0; no other rule changed.

Verification

  • pnpm install --frozen-lockfile: pass
  • vp run build: pass
  • vp check: pass (0 errors; warnings are existing debt)
  • vp run check: pass ("every type gate green")
  • vp run -r test:unit: pass (root 3998 tests, examples 73 / 50 / 56)
  • vp run docgen: pass
  • vp run test:coverage then vp exec fallow audit --base origin/trunk: verdict warn, 0 dead-code issues; the 7 complexity and 13 duplication findings are inherited (the gate excluded 19 inherited findings)

Changeset

None: tests, examples and lint config only; no published behaviour changes.

  • A changeset under .changeset/ for every change to published behaviour

Notes

prefer-namespace-imports was still off on trunk (PR #594 not merged), so the new DateTime imports use import * as DateTime from "effect/DateTime", matching the existing namespace style. Each file carries a small local at / now helper rather than a shared module, to avoid adding a file to the package's emitted declarations.


Generated by Claude Code

@changeset-bot

changeset-bot Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1ae0df8

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

Part of #533. Build dates through DateTime (makeUnsafe / nowUnsafe) instead of
new Date / Date.parse; drop the warn line from vite.config.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y5G6PMempKsgjiV1NDcCJY
@thomasfosterau
thomasfosterau merged commit 931ce9e into trunk Nov 12, 2026
4 checks passed
@thomasfosterau
thomasfosterau deleted the lint-use-clock-service branch November 12, 2026 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants