chore: docs lint fix (#8241)

This commit is contained in:
Alex Yang
2026-03-01 16:53:24 +09:00
parent e8bb8fdc14
commit 28d0a332ee
10 changed files with 113 additions and 115 deletions
+1 -3
View File
@@ -25,9 +25,7 @@ function BlogList() {
.getPages()
.filter((p) => !p.data.draft)
.sort((a, b) => {
return (
new Date(b.data.date).getTime() - new Date(a.data.date).getTime()
);
return new Date(b.data.date).getTime() - new Date(a.data.date).getTime();
});
return (
+10 -2
View File
@@ -28,8 +28,16 @@ export const metadata: Metadata = {
icons: {
icon: [
{ url: "https://docs.better-auth.com/favicon/favicon.ico", sizes: "any" },
{ url: "https://docs.better-auth.com/favicon/favicon-32x32.png", sizes: "32x32", type: "image/png" },
{ url: "https://docs.better-auth.com/favicon/favicon-16x16.png", sizes: "16x16", type: "image/png" },
{
url: "https://docs.better-auth.com/favicon/favicon-32x32.png",
sizes: "32x32",
type: "image/png",
},
{
url: "https://docs.better-auth.com/favicon/favicon-16x16.png",
sizes: "16x16",
type: "image/png",
},
],
apple: "https://docs.better-auth.com/favicon/apple-touch-icon.png",
},
+34 -34
View File
@@ -307,9 +307,9 @@ function PricingHero() {
<p className="text-sm font-light text-foreground/80 tabular-nums flex items-baseline justify-center gap-0.5">
<span>{tier.price}</span>
{tier.note && (
<span className="text-[9px] text-foreground/50 dark:text-foreground/55 font-mono">
{tier.note}
</span>
<span className="text-[9px] text-foreground/50 dark:text-foreground/55 font-mono">
{tier.note}
</span>
)}
</p>
</div>
@@ -330,10 +330,10 @@ function PricingHero() {
}}
className="flex items-baseline justify-between py-1.5 border-b border-dashed border-foreground/[0.06] last:border-0"
>
<span className="text-[11px] text-foreground/70 dark:text-foreground/50 uppercase tracking-wider">
{item.label}
</span>
<span className="text-[11px] text-foreground/85 dark:text-foreground/75 font-mono">
<span className="text-[11px] text-foreground/70 dark:text-foreground/50 uppercase tracking-wider">
{item.label}
</span>
<span className="text-[11px] text-foreground/85 dark:text-foreground/75 font-mono">
{item.value}
</span>
</motion.div>
@@ -407,9 +407,9 @@ function PricingCard({
{tier.name}
</h3>
{isHighlighted && (
<span className="text-[9px] font-mono uppercase tracking-widest text-foreground/70 dark:text-foreground/50 border border-dashed border-foreground/15 px-1.5 py-0.5 leading-none">
popular
</span>
<span className="text-[9px] font-mono uppercase tracking-widest text-foreground/70 dark:text-foreground/50 border border-dashed border-foreground/15 px-1.5 py-0.5 leading-none">
popular
</span>
)}
</div>
@@ -423,9 +423,9 @@ function PricingCard({
{tier.price}
</span>
{tier.priceNote && (
<span className="text-[11px] text-foreground/60 dark:text-foreground/40 font-mono">
{tier.priceNote}
</span>
<span className="text-[11px] text-foreground/60 dark:text-foreground/40 font-mono">
{tier.priceNote}
</span>
)}
</div>
@@ -512,21 +512,21 @@ export function PricingPageClient() {
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.3, delay: 0.05 }}
>
<p className="text-[11px] uppercase tracking-widest text-foreground/55 dark:text-foreground/40 font-mono mb-5">
<span className="text-foreground/75 dark:text-foreground/60">
# Framework
</span>
</p>
<p className="text-[11px] uppercase tracking-widest text-foreground/55 dark:text-foreground/40 font-mono mb-5">
<span className="text-foreground/75 dark:text-foreground/60">
# Framework
</span>
</p>
<div className="relative border border-dashed border-foreground/[0.12] bg-foreground/[0.02] overflow-hidden">
<div className="px-5 py-5">
<div className="flex items-start justify-between gap-6">
<div className="space-y-2.5 flex-1">
<div className="flex items-center gap-2">
<h3 className="text-[11px] font-mono uppercase tracking-widest text-foreground/85">
Community
</h3>
<span className="text-[9px] font-mono uppercase tracking-widest text-foreground/75 dark:text-foreground/60 border border-dashed border-foreground/15 px-1.5 py-0.5 leading-none">
<h3 className="text-[11px] font-mono uppercase tracking-widest text-foreground/85">
Community
</h3>
<span className="text-[9px] font-mono uppercase tracking-widest text-foreground/75 dark:text-foreground/60 border border-dashed border-foreground/15 px-1.5 py-0.5 leading-none">
open source
</span>
</div>
@@ -567,11 +567,11 @@ export function PricingPageClient() {
animate={{ opacity: 1 }}
transition={{ duration: 0.4, delay: 0.15 }}
>
<p className="text-[11px] uppercase tracking-widest text-foreground/55 dark:text-foreground/40 font-mono mb-5">
<span className="text-foreground/75 dark:text-foreground/60">
# Infrastructure
</span>
</p>
<p className="text-[11px] uppercase tracking-widest text-foreground/55 dark:text-foreground/40 font-mono mb-5">
<span className="text-foreground/75 dark:text-foreground/60">
# Infrastructure
</span>
</p>
{/* Pricing Cards */}
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-0">
@@ -587,8 +587,8 @@ export function PricingPageClient() {
</span>{" "}
An event is any auth action tracked by the dashboard &mdash;
sign-ins, sign-ups, session refreshes, password resets, OTP
verifications, and more. Each API call that triggers an
auth action counts as one event.
verifications, and more. Each API call that triggers an auth
action counts as one event.
</p>
</div>
</motion.div>
@@ -599,9 +599,9 @@ export function PricingPageClient() {
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.3, delay: 0.45 }}
>
<p className="text-[11px] uppercase tracking-widest text-foreground/55 dark:text-foreground/40 font-mono mb-5">
# feature comparison
</p>
<p className="text-[11px] uppercase tracking-widest text-foreground/55 dark:text-foreground/40 font-mono mb-5">
# feature comparison
</p>
<div className="border border-dashed border-foreground/[0.08] overflow-x-auto">
<table className="w-full min-w-[600px]">
@@ -615,8 +615,8 @@ export function PricingPageClient() {
key={name}
className={`text-center text-[11px] uppercase tracking-widest font-mono font-normal py-3 px-3 w-[18%] ${
name === "Pro"
? "text-foreground/80 bg-foreground/[0.025]"
: "text-foreground/60 dark:text-foreground/40"
? "text-foreground/80 bg-foreground/[0.025]"
: "text-foreground/60 dark:text-foreground/40"
}`}
>
{name}
+2 -8
View File
@@ -1,8 +1,6 @@
import Link from "next/link";
import { HalftoneBackground } from "@/components/landing/halftone-bg";
import { BlogTOC } from "./blog-toc";
import type { ReactNode } from "react";
import { HalftoneBackground } from "@/components/landing/halftone-bg";
interface BlogPostData {
title: string;
@@ -96,17 +94,13 @@ export function BlogLeftPanel({ postCount, post }: BlogLeftPanelProps) {
<div className="flex items-center gap-2 text-[11px] font-mono text-foreground/40">
{post.author?.name && (
<span className="text-foreground/60">
{post.author.name}
</span>
<span className="text-foreground/60">{post.author.name}</span>
)}
{post.author?.name && post.date && (
<span className="text-foreground/20">&middot;</span>
)}
{post.date && <span>{formatDate(post.date)}</span>}
</div>
</div>
</div>
</div>
+9 -9
View File
@@ -226,12 +226,12 @@ function BranchSwitcher() {
"flex w-full items-center gap-2 px-3 py-2 text-[12px] transition-colors",
branch === "main"
? "text-foreground bg-foreground/5"
: "text-foreground/60 hover:text-foreground hover:bg-foreground/3",
)}
onClick={() => switchBranch("main")}
>
<span className="grow text-left">main</span>
<span className="text-[10px] text-foreground/45 uppercase tracking-wider">
: "text-foreground/60 hover:text-foreground hover:bg-foreground/3",
)}
onClick={() => switchBranch("main")}
>
<span className="grow text-left">main</span>
<span className="text-[10px] text-foreground/45 uppercase tracking-wider">
Stable
</span>
</button>
@@ -241,9 +241,9 @@ function BranchSwitcher() {
"flex w-full items-center gap-2 px-3 py-2 text-[12px] transition-colors",
branch === "canary"
? "text-foreground bg-foreground/5"
: "text-foreground/60 hover:text-foreground hover:bg-foreground/3",
)}
onClick={() => switchBranch("canary")}
: "text-foreground/60 hover:text-foreground hover:bg-foreground/3",
)}
onClick={() => switchBranch("canary")}
>
<span className="grow text-left">canary</span>
<Badge
+3 -3
View File
@@ -319,9 +319,9 @@ export function DatabaseTable({
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
className="text-foreground/50"
>
<ellipse cx="12" cy="5" rx="9" ry="3" />
className="text-foreground/50"
>
<ellipse cx="12" cy="5" rx="9" ry="3" />
<path d="M3 5v14a9 3 0 0 0 18 0V5" />
<path d="M3 12a9 3 0 0 0 18 0" />
</svg>
+4 -4
View File
@@ -157,8 +157,8 @@ export function StepperTOC({ items, children }: StepperTOCProps) {
isActive
? "text-foreground"
: isVisible
? "text-foreground/60"
: "text-foreground/40 group-hover:text-foreground/65"
? "text-foreground/60"
: "text-foreground/40 group-hover:text-foreground/65"
}
`}
>
@@ -229,8 +229,8 @@ export function StepperTOC({ items, children }: StepperTOCProps) {
<span
className={`text-[10px] uppercase tracking-wider whitespace-nowrap transition-colors duration-200 ${
isSubActive
? "text-foreground"
: "text-foreground/40 group-hover:text-foreground/65"
? "text-foreground"
: "text-foreground/40 group-hover:text-foreground/65"
}`}
>
{sub.title}
+1 -4
View File
@@ -277,10 +277,7 @@ export function HalftoneBackground() {
className="absolute inset-0 overflow-hidden bg-background"
aria-hidden="true"
>
<canvas
ref={canvasRef}
className="w-full h-full invert dark:invert-0"
/>
<canvas ref={canvasRef} className="w-full h-full invert dark:invert-0" />
</div>
);
}
+4 -1
View File
@@ -1535,7 +1535,10 @@ export function HeroReadMe({
</h1>
<p className="text-sm sm:text-[14px] text-neutral-600 dark:text-neutral-300 leading-[1.8] sm:leading-[1.9] mb-5 sm:mb-6">
Better Auth is an authentication and authorization framework. It provides a comprehensive set of features out of the box and includes a Plugin ecosystem that simplifies adding advanced functionalities and infrastructure to help own your auth at scale.
Better Auth is an authentication and authorization framework. It
provides a comprehensive set of features out of the box and
includes a Plugin ecosystem that simplifies adding advanced
functionalities and infrastructure to help own your auth at scale.
</p>
<InstallBlock />
@@ -3,7 +3,7 @@
import { AnimatePresence, MotionConfig, motion } from "framer-motion";
import { ChevronDownIcon } from "lucide-react";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { usePathname, useRouter } from "next/navigation";
import { useCallback, useRef, useState } from "react";
import { cn } from "@/lib/utils";
import DarkPng from "../../public/branding/better-auth-logo-dark.png";
@@ -12,9 +12,7 @@ import { Logo } from "../icons/logo";
import { contents } from "../sidebar-content";
import { Badge } from "../ui/badge";
import LogoContextMenu from "./logo-context-menu";
import { Button } from "../ui/button";
import { useRouter } from "next/navigation";
interface NavFileItem {
name: string;
href: string;
@@ -130,7 +128,7 @@ export function StaggeredNavFiles() {
const dropdownBorderClass = isNarrowLeft
? "border-foreground/6"
: "border-foreground/[0.08]";
const router = useRouter();
const _router = useRouter();
return (
<>
<div className="absolute top-0 left-0 right-0 z-[99] flex items-start pointer-events-none">
@@ -266,10 +264,10 @@ export function StaggeredNavFiles() {
className={`font-mono text-xs uppercase tracking-wider transition-colors duration-150 whitespace-nowrap ${
active
? "text-foreground"
: "text-foreground/65 dark:text-foreground/50 group-hover/tab:text-foreground/75"
}`}
>
{item.name}
: "text-foreground/65 dark:text-foreground/50 group-hover/tab:text-foreground/75"
}`}
>
{item.name}
</span>
</Link>
</motion.div>
@@ -300,10 +298,10 @@ export function StaggeredNavFiles() {
? "text-foreground"
: resourcesOpen
? "text-foreground/80"
: "text-foreground/65 dark:text-foreground/50 group-hover/tab:text-foreground/75"
}`}
>
resources
: "text-foreground/65 dark:text-foreground/50 group-hover/tab:text-foreground/75"
}`}
>
resources
</span>
<svg
className={`h-2 w-2 text-foreground/55 dark:text-foreground/40 transition-transform duration-200 ${
@@ -352,8 +350,8 @@ export function StaggeredNavFiles() {
href="https://github.com/better-auth/better-auth"
target="_blank"
rel="noreferrer"
className="p-1.5 text-foreground/55 dark:text-foreground/40 hover:text-foreground/75 transition-colors"
aria-label="GitHub"
className="p-1.5 text-foreground/55 dark:text-foreground/40 hover:text-foreground/75 transition-colors"
aria-label="GitHub"
>
<svg
xmlns="http://www.w3.org/2000/svg"
@@ -371,8 +369,8 @@ className="p-1.5 text-foreground/55 dark:text-foreground/40 hover:text-foregroun
href="https://discord.gg/better-auth"
target="_blank"
rel="noreferrer"
className="p-1.5 text-foreground/55 dark:text-foreground/40 hover:text-foreground/75 transition-colors"
aria-label="Discord"
className="p-1.5 text-foreground/55 dark:text-foreground/40 hover:text-foreground/75 transition-colors"
aria-label="Discord"
>
<svg
xmlns="http://www.w3.org/2000/svg"
@@ -390,8 +388,8 @@ className="p-1.5 text-foreground/55 dark:text-foreground/40 hover:text-foregroun
href="https://reddit.com/r/better_auth"
target="_blank"
rel="noreferrer"
className="p-1.5 text-foreground/55 dark:text-foreground/40 hover:text-foreground/75 transition-colors"
aria-label="Reddit"
className="p-1.5 text-foreground/55 dark:text-foreground/40 hover:text-foreground/75 transition-colors"
aria-label="Reddit"
>
<svg
xmlns="http://www.w3.org/2000/svg"
@@ -411,8 +409,8 @@ className="p-1.5 text-foreground/55 dark:text-foreground/40 hover:text-foregroun
href="https://x.com/better_auth"
target="_blank"
rel="noreferrer"
className="p-1.5 text-foreground/55 dark:text-foreground/40 hover:text-foreground/75 transition-colors"
aria-label="X"
className="p-1.5 text-foreground/55 dark:text-foreground/40 hover:text-foreground/75 transition-colors"
aria-label="X"
>
<svg
xmlns="http://www.w3.org/2000/svg"
@@ -430,8 +428,8 @@ className="p-1.5 text-foreground/55 dark:text-foreground/40 hover:text-foregroun
href="https://www.npmjs.com/package/better-auth"
target="_blank"
rel="noreferrer"
className="p-1.5 text-foreground/55 dark:text-foreground/40 hover:text-foreground/75 transition-colors"
aria-label="npm"
className="p-1.5 text-foreground/55 dark:text-foreground/40 hover:text-foreground/75 transition-colors"
aria-label="npm"
>
<svg
xmlns="http://www.w3.org/2000/svg"
@@ -531,10 +529,10 @@ className="p-1.5 text-foreground/55 dark:text-foreground/40 hover:text-foregroun
"font-medium text-sm tracking-wider",
mobileDocSection === index
? "text-foreground bg-foreground/3"
: "text-foreground/70 hover:text-foreground hover:bg-foreground/3",
)}
onClick={() =>
setMobileDocSection((prev) =>
: "text-foreground/70 hover:text-foreground hover:bg-foreground/3",
)}
onClick={() =>
setMobileDocSection((prev) =>
prev === index ? -1 : index,
)
}
@@ -568,10 +566,10 @@ className="p-1.5 text-foreground/55 dark:text-foreground/40 hover:text-foregroun
"relative flex items-center gap-2.5 px-5 py-1.5 text-[14px] transition-all duration-150",
pathname === section.href
? "text-foreground bg-foreground/6"
: "text-foreground/75 dark:text-foreground/60 hover:text-foreground/90 hover:bg-foreground/3",
)}
>
<span className="truncate">Overview</span>
: "text-foreground/75 dark:text-foreground/60 hover:text-foreground/90 hover:bg-foreground/3",
)}
>
<span className="truncate">Overview</span>
</Link>
)}
{section.list.map((item, i) => {
@@ -603,15 +601,15 @@ className="p-1.5 text-foreground/55 dark:text-foreground/40 hover:text-foregroun
"relative flex items-center gap-2.5 px-5 py-1.5 text-[14px] transition-all duration-150",
active
? "text-foreground bg-foreground/6"
: "text-foreground/75 dark:text-foreground/60 hover:text-foreground/90 hover:bg-foreground/3",
)}
>
<span
className={cn(
"min-w-5 [&>svg]:size-[14px] transition-colors duration-150",
active
? "text-foreground"
: "text-foreground/75 dark:text-foreground/60",
: "text-foreground/75 dark:text-foreground/60 hover:text-foreground/90 hover:bg-foreground/3",
)}
>
<span
className={cn(
"min-w-5 [&>svg]:size-[14px] transition-colors duration-150",
active
? "text-foreground"
: "text-foreground/75 dark:text-foreground/60",
)}
>
<item.icon className="text-foreground/75" />
@@ -695,8 +693,8 @@ className="p-1.5 text-foreground/55 dark:text-foreground/40 hover:text-foregroun
isActive(item.path || item.href) ||
(item.href === "/docs" && isDocs)
? "text-foreground"
: "text-foreground/75 dark:text-foreground/60"
}`}
: "text-foreground/75 dark:text-foreground/60"
}`}
>
{item.name}
</span>
@@ -725,11 +723,11 @@ className="p-1.5 text-foreground/55 dark:text-foreground/40 hover:text-foregroun
}}
className="px-5 pt-4"
>
<a
href="/sign-in"
onClick={() => setMobileMenuOpen(false)}
className="flex items-center justify-center gap-1.5 w-full py-3 bg-foreground text-background font-mono text-sm uppercase tracking-wider transition-opacity hover:opacity-90"
>
<a
href="/sign-in"
onClick={() => setMobileMenuOpen(false)}
className="flex items-center justify-center gap-1.5 w-full py-3 bg-foreground text-background font-mono text-sm uppercase tracking-wider transition-opacity hover:opacity-90"
>
get-started
<svg
className="h-2.5 w-2.5 opacity-50"