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

+13 -13
View File
@@ -1,15 +1,15 @@
import { forwardRef } from "react";
import { getStaticImage } from "@/lib/utils";
import { forwardRef } from 'react'
import { getStaticImage } from '@/lib/utils'
export interface PuzzlePieceDisplayProps {
/** 故居名称,如 'chenyun' */
residence: string;
residence: string
/** 碎片ID */
pieceId: number;
pieceId: number
/** 是否显示发光动画 */
showGlow?: boolean;
showGlow?: boolean
/** 自定义类名 */
className?: string;
className?: string
}
/**
@@ -19,16 +19,16 @@ export interface PuzzlePieceDisplayProps {
* - 可以被 ref 引用,用于飞行动画
*/
const PuzzlePieceDisplay = forwardRef<HTMLDivElement, PuzzlePieceDisplayProps>(
({ residence, pieceId, showGlow = true, className = "" }, ref) => {
({ residence, pieceId, showGlow = true, className = '' }, ref) => {
// 碎片图片路径
const pieceImage = getStaticImage(`puzzle/${residence}/${pieceId}`);
const pieceImage = getStaticImage(`puzzle/${residence}/${pieceId}`)
return (
<div
ref={ref}
className={`relative inline-block ${className}`}
style={{
animation: showGlow ? "puzzleGlow 1s ease-in-out infinite" : "none",
animation: showGlow ? 'puzzleGlow 1s ease-in-out infinite' : 'none',
}}
>
<style>{`
@@ -43,10 +43,10 @@ const PuzzlePieceDisplay = forwardRef<HTMLDivElement, PuzzlePieceDisplayProps>(
`}</style>
<img src={pieceImage} alt={`碎片 ${pieceId}`} className="w-full" />
</div>
);
)
}
);
)
PuzzlePieceDisplay.displayName = "PuzzlePieceDisplay";
PuzzlePieceDisplay.displayName = 'PuzzlePieceDisplay'
export default PuzzlePieceDisplay;
export default PuzzlePieceDisplay