[PR #3842] [MERGED] chore: enable noFloatingPromises lint rule #30644

Closed
opened 2026-04-17 21:41:10 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3842
Author: @himself65
Created: 8/6/2025
Status: Merged
Merged: 9/3/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/08/06/no-floating-promise


📝 Commits (4)

📊 Changes

17 files changed (+122 additions, -96 deletions)

View changed files

📝 biome.json (+2 -1)
📝 docs/components/ui/sparkles.tsx (+1 -0)
📝 docs/scripts/endpoint-to-doc/index.ts (+2 -2)
📝 e2e/integration/package.json (+3 -0)
📝 packages/better-auth/src/adapters/test.ts (+75 -75)
📝 packages/better-auth/src/client/query.ts (+9 -1)
📝 packages/better-auth/src/plugins/api-key/index.ts (+6 -1)
📝 packages/better-auth/src/plugins/api-key/routes/create-api-key.ts (+1 -1)
📝 packages/better-auth/src/plugins/api-key/routes/delete-all-expired-api-keys.ts (+1 -1)
📝 packages/better-auth/src/plugins/api-key/routes/delete-api-key.ts (+1 -1)
📝 packages/better-auth/src/plugins/api-key/routes/get-api-key.ts (+1 -1)
📝 packages/better-auth/src/plugins/api-key/routes/index.ts (+7 -7)
📝 packages/better-auth/src/plugins/api-key/routes/list-api-keys.ts (+2 -2)
📝 packages/better-auth/src/plugins/api-key/routes/update-api-key.ts (+1 -1)
📝 packages/better-auth/src/plugins/api-key/routes/verify-api-key.ts (+2 -1)
📝 packages/cli/src/index.ts (+4 -1)
📝 pnpm-lock.yaml (+4 -0)

📄 Description

Upstream comment: https://github.com/better-auth/better-auth/pull/3822#discussion_r2258508346

Summary by cubic

Enabled the noFloatingPromises lint rule to catch unhandled promise rejections and updated codebase to handle or explicitly ignore floating promises.

  • Refactors
    • Added error handling or lint ignores for floating promises in API key routes, CLI entrypoint, and UI components.
    • Updated tests and utility functions to await or handle async calls as needed.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/3842 **Author:** [@himself65](https://github.com/himself65) **Created:** 8/6/2025 **Status:** ✅ Merged **Merged:** 9/3/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/08/06/no-floating-promise` --- ### 📝 Commits (4) - [`ce17c97`](https://github.com/better-auth/better-auth/commit/ce17c976715658ba804fd46028f47e69cbbebe9f) chore: enable `noFloatingPromises` lint rule - [`2d24de5`](https://github.com/better-auth/better-auth/commit/2d24de5c474894c6711a1a71391242549a324f08) fix: cleanup api key - [`7317c83`](https://github.com/better-auth/better-auth/commit/7317c83f612fefdb36c7aadd0a16892c4c1fb264) fix: handle error - [`62d5ac2`](https://github.com/better-auth/better-auth/commit/62d5ac282d6c2c47896ca6c24bf9ef861f752c56) fix: cache ### 📊 Changes **17 files changed** (+122 additions, -96 deletions) <details> <summary>View changed files</summary> 📝 `biome.json` (+2 -1) 📝 `docs/components/ui/sparkles.tsx` (+1 -0) 📝 `docs/scripts/endpoint-to-doc/index.ts` (+2 -2) 📝 `e2e/integration/package.json` (+3 -0) 📝 `packages/better-auth/src/adapters/test.ts` (+75 -75) 📝 `packages/better-auth/src/client/query.ts` (+9 -1) 📝 `packages/better-auth/src/plugins/api-key/index.ts` (+6 -1) 📝 `packages/better-auth/src/plugins/api-key/routes/create-api-key.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/api-key/routes/delete-all-expired-api-keys.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/api-key/routes/delete-api-key.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/api-key/routes/get-api-key.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/api-key/routes/index.ts` (+7 -7) 📝 `packages/better-auth/src/plugins/api-key/routes/list-api-keys.ts` (+2 -2) 📝 `packages/better-auth/src/plugins/api-key/routes/update-api-key.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/api-key/routes/verify-api-key.ts` (+2 -1) 📝 `packages/cli/src/index.ts` (+4 -1) 📝 `pnpm-lock.yaml` (+4 -0) </details> ### 📄 Description Upstream comment: https://github.com/better-auth/better-auth/pull/3822#discussion_r2258508346 <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Enabled the `noFloatingPromises` lint rule to catch unhandled promise rejections and updated codebase to handle or explicitly ignore floating promises. - **Refactors** - Added error handling or lint ignores for floating promises in API key routes, CLI entrypoint, and UI components. - Updated tests and utility functions to await or handle async calls as needed. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-17 21:41:10 -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#30644