feat: 更新 ESLint 和 Prettier 配置,增强代码质量管理

- 在 .gitignore 中添加 public/audio/* 以忽略音频文件。
- 更新 bun.lock,添加 eslint-config-prettier 和 eslint-plugin-prettier 依赖,确保 ESLint 与 Prettier 的兼容性。
- 修改 eslint.config.ts,整合 Prettier 规则,优化代码风格一致性。
- 在 package.json 中添加 lint:fix 和 format 脚本,简化代码格式化和修复流程。
- 更新 tailwind.config.ts 和其他组件文件,统一代码风格,提升可读性。
This commit is contained in:
zhongyidian committed 2026-03-05 13:50:47 +08:00
1 parent 5d00adc1a5
commit 76c67b492e
216 files changed
+12454 -13976

No files matched your search

+15 -20
View File
@@ -1,16 +1,16 @@
import { getBackgroundImage, getStaticImage } from "@/lib/utils";
import { getBackgroundImage, getStaticImage } from '@/lib/utils'
export interface ErrorAlertProps {
/** 文本 */
text: string;
text: string
/** 是否可见 */
visible?: boolean;
visible?: boolean
/** 点击遮罩层回调 */
onMaskClick?: () => void;
onMaskClick?: () => void
/** 关闭回调 */
onClose?: () => void;
onClose?: () => void
/** 自定义 zIndex */
zIndex?: number;
zIndex?: number
}
/**
@@ -24,18 +24,15 @@ const ErrorAlert = ({
onClose,
zIndex = 10000,
}: ErrorAlertProps) => {
if (!visible) return null;
if (!visible) return null
return (
<div
className="absolute inset-0 z-50 flex items-center justify-center"
style={{ zIndex }}
>
<div className="absolute inset-0 z-50 flex items-center justify-center" style={{ zIndex }}>
{/* 蒙版背景 */}
<div
className="absolute inset-0 bg-cover bg-center bg-no-repeat"
style={{
backgroundImage: `url(${getStaticImage("components/蒙版遮罩")})`,
backgroundImage: `url(${getStaticImage('components/蒙版遮罩')})`,
}}
onClick={onMaskClick || onClose}
/>
@@ -45,9 +42,7 @@ const ErrorAlert = ({
{/* 标题和副标题容器 - 带深色背景条 */}
<div className="w-full bg-black/70 px-20 py-20 flex flex-col items-center gap-4">
{/* 副标题 */}
<div className="text-white text-5xl font-medium tracking-widest">
{text}
</div>
<div className="text-white text-5xl font-medium tracking-widest">{text}</div>
</div>
{/* 继续按钮 */}
@@ -55,8 +50,8 @@ const ErrorAlert = ({
className="w-[414px] h-[109px] bg-cover bg-center bg-no-repeat cursor-pointer hover:scale-105 hover:brightness-110 transition-all duration-300"
style={{
backgroundImage: `
${getBackgroundImage("components/继续前进")},
${getBackgroundImage("components/按钮")}
${getBackgroundImage('components/继续前进')},
${getBackgroundImage('components/按钮')}
`,
}}
onClick={onClose}
@@ -64,7 +59,7 @@ const ErrorAlert = ({
></div>
</div>
</div>
);
};
)
}
export default ErrorAlert;
export default ErrorAlert