[PR #3866] [CLOSED] chore: noConsole path based lint rule #5054

Closed
opened 2026-03-13 12:09:19 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3866
Author: @Kinfe123
Created: 8/7/2025
Status: Closed

Base: canaryHead: chore/no-console-log-lint-rule


📝 Commits (7)

📊 Changes

27 files changed (+31 additions, -46 deletions)

View changed files

📝 biome.json (+29 -3)
📝 demo/nextjs/app/dashboard/page.tsx (+0 -1)
📝 demo/nextjs/lib/auth.ts (+0 -1)
📝 demo/nextjs/lib/email/invitation.tsx (+0 -1)
📝 demo/nextjs/lib/email/reset-password.tsx (+0 -1)
📝 docs/app/api/og-release/route.tsx (+0 -1)
📝 docs/app/api/og/route.tsx (+0 -1)
📝 docs/components/ui/sparkles.tsx (+0 -1)
📝 package.json (+1 -0)
📝 packages/better-auth/src/adapters/create-adapter/index.ts (+0 -3)
📝 packages/better-auth/src/adapters/drizzle-adapter/test/adapter.drizzle.mysql.test.ts (+1 -3)
📝 packages/better-auth/src/adapters/kysely-adapter/test/normal/adapter.kysely.test.ts (+0 -4)
📝 packages/better-auth/src/adapters/kysely-adapter/test/number-id/adapter.kysely.number-id.test.ts (+0 -2)
📝 packages/better-auth/src/adapters/prisma-adapter/test/normal-tests/adapter.prisma.test.ts (+0 -4)
📝 packages/better-auth/src/adapters/prisma-adapter/test/number-id-tests/adapter.prisma.number-id.test.ts (+0 -3)
📝 packages/better-auth/src/adapters/test.ts (+0 -1)
📝 packages/better-auth/src/api/routes/email-verification.test.ts (+0 -1)
📝 packages/better-auth/src/api/routes/update-user.test.ts (+0 -1)
📝 packages/better-auth/src/plugins/api-key/api-key.test.ts (+0 -1)
📝 packages/better-auth/src/plugins/mcp/authorize.ts (+0 -2)

...and 7 more files

📄 Description

This PR introduces a new noConsole: "error" rule that removes all console.log statements when running pnpm lint:fix. The rule is path-based, applying to all files within the core package, including tests, with specific exceptions configured through Biome where necessary.


Summary by cubic

Added a path-based lint rule to block console.log statements in the core package, with exceptions for specific files. Removed all existing console.log calls from the codebase to enforce cleaner logs.

  • Refactors
    • Updated biome.json to apply the noConsoleLog rule to core files, ignoring logger utilities.
    • Cleaned up all console.log usage across packages, examples, and tests.

🔄 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/3866 **Author:** [@Kinfe123](https://github.com/Kinfe123) **Created:** 8/7/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `chore/no-console-log-lint-rule` --- ### 📝 Commits (7) - [`0d7027b`](https://github.com/better-auth/better-auth/commit/0d7027bbc96a1f672185c2569cc5d2a748638f49) docs: unify component implementations for consistency (#3799) - [`3d2540a`](https://github.com/better-auth/better-auth/commit/3d2540a77b7228acd7a0bc41ab327336faf9b000) noConsole with warning - [`277fd52`](https://github.com/better-auth/better-auth/commit/277fd5262a3a12716ac87bc579639f32bb8e3384) update the rule - [`2759850`](https://github.com/better-auth/better-auth/commit/27598509332b29577bf6867c5c8783a6d81d7c34) update - [`d78fe35`](https://github.com/better-auth/better-auth/commit/d78fe356d17520b9548e94df01818f9225429435) update with version - [`a1af156`](https://github.com/better-auth/better-auth/commit/a1af156a925e4aea60caeb077f86e343917cdf58) lint with unsafe flag - [`e2a86ee`](https://github.com/better-auth/better-auth/commit/e2a86eed5eb0eeb2d597ec9964d86182e51c5556) lint ### 📊 Changes **27 files changed** (+31 additions, -46 deletions) <details> <summary>View changed files</summary> 📝 `biome.json` (+29 -3) 📝 `demo/nextjs/app/dashboard/page.tsx` (+0 -1) 📝 `demo/nextjs/lib/auth.ts` (+0 -1) 📝 `demo/nextjs/lib/email/invitation.tsx` (+0 -1) 📝 `demo/nextjs/lib/email/reset-password.tsx` (+0 -1) 📝 `docs/app/api/og-release/route.tsx` (+0 -1) 📝 `docs/app/api/og/route.tsx` (+0 -1) 📝 `docs/components/ui/sparkles.tsx` (+0 -1) 📝 `package.json` (+1 -0) 📝 `packages/better-auth/src/adapters/create-adapter/index.ts` (+0 -3) 📝 `packages/better-auth/src/adapters/drizzle-adapter/test/adapter.drizzle.mysql.test.ts` (+1 -3) 📝 `packages/better-auth/src/adapters/kysely-adapter/test/normal/adapter.kysely.test.ts` (+0 -4) 📝 `packages/better-auth/src/adapters/kysely-adapter/test/number-id/adapter.kysely.number-id.test.ts` (+0 -2) 📝 `packages/better-auth/src/adapters/prisma-adapter/test/normal-tests/adapter.prisma.test.ts` (+0 -4) 📝 `packages/better-auth/src/adapters/prisma-adapter/test/number-id-tests/adapter.prisma.number-id.test.ts` (+0 -3) 📝 `packages/better-auth/src/adapters/test.ts` (+0 -1) 📝 `packages/better-auth/src/api/routes/email-verification.test.ts` (+0 -1) 📝 `packages/better-auth/src/api/routes/update-user.test.ts` (+0 -1) 📝 `packages/better-auth/src/plugins/api-key/api-key.test.ts` (+0 -1) 📝 `packages/better-auth/src/plugins/mcp/authorize.ts` (+0 -2) _...and 7 more files_ </details> ### 📄 Description This PR introduces a new noConsole: "error" rule that removes all console.log statements when running pnpm lint:fix. The rule is path-based, applying to all files within the core package, including tests, with specific exceptions configured through Biome where necessary. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Added a path-based lint rule to block console.log statements in the core package, with exceptions for specific files. Removed all existing console.log calls from the codebase to enforce cleaner logs. - **Refactors** - Updated biome.json to apply the noConsoleLog rule to core files, ignoring logger utilities. - Cleaned up all console.log usage across packages, examples, and tests. <!-- 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-03-13 12:09:19 -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#5054