This is a Next.js project bootstrapped with create-next-app.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Inter, a custom Google Font.
本项目配置了代码规范化工具链,实现团队成员可以按个人习惯编写代码,但在提交时会自动进行规范化:
- Prettier - 代码格式化工具
- ESLint - 代码质量检查工具
- Husky - Git 钩子工具
- lint-staged - 对暂存区文件进行检查和格式化
团队成员可以按照各自的开发习惯进行编码,但在提交时都会自动进行代码格式化和检查,确保最终提交的代码符合统一标准。
- 允许使用
any类型,不强制要求严格的类型检查 - 允许隐式 any 类型 (
noImplicitAny: false)
- 使用标准的 Prettier 格式化规则
- 行末分号:添加分号
- 尾随逗号:ES5 标准
- 单引号:使用单引号
- 行宽:80 字符
- 箭头函数参数:尽可能省略括号
# 检查代码格式
pnpm format:check
# 格式化所有代码
pnpm format
# 修复 ESLint 问题
pnpm lint:fix- 所有团队成员都可以继续使用他们习惯的任何开发方式
- 配置了 VS Code 的格式化设置和推荐扩展
- 添加了相关的 npm 脚本用于格式化和检查代码
- 团队成员应理解并接受统一的代码规范,而不是追求个人偏好
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.