[PR #5938] chore: enable useDateNow lint rule #14582

Closed
opened 2026-04-13 09:32:04 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/better-auth/better-auth/pull/5938

State: closed
Merged: Yes


Summary by cubic

Enabled the useDateNow lint rule and refactored time calculations to use Date.now() instead of new Date().getTime(). This standardizes epoch time usage and slightly improves performance in the admin UI and API key logic/tests.

  • Refactors
    • Config: added "useDateNow": "error" to biome.json.
    • Admin: banExpiresIn now uses Date.now().
    • API key plugin: expiration and refill checks updated to Date.now(); tests adjusted accordingly.

Written for commit 328c467d38. Summary will update automatically on new commits.

**Original Pull Request:** https://github.com/better-auth/better-auth/pull/5938 **State:** closed **Merged:** Yes --- <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Enabled the useDateNow lint rule and refactored time calculations to use Date.now() instead of new Date().getTime(). This standardizes epoch time usage and slightly improves performance in the admin UI and API key logic/tests. - **Refactors** - Config: added "useDateNow": "error" to biome.json. - Admin: banExpiresIn now uses Date.now(). - API key plugin: expiration and refill checks updated to Date.now(); tests adjusted accordingly. <sup>Written for commit 328c467d381e588315e3a6e159c626aadbdf4ef8. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. -->
GiteaMirror added the pull-request label 2026-04-13 09:32:04 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#14582