lailai’s Project Conventions Guide
本文为我的项目规范指南。
参考资料
- Semantic Versioning 2.0.0
- Conventional Commits
- Keep a Changelog
- EditorConfig
- Prettier
- Contributor Covenant
Git
- Commits 应遵循 Conventional Commits,使用
type(scope): description的格式。 - 项目应使用 Vite 默认的
.gitignore。
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
README
- README 应使用
README.md。 - 多语言 README 应以英文版本为基准,其他语言版本使用
README.<language-tag>.md的格式。
许可协议
- 许可协议应使用
LICENSE。
文档
- 文档文本格式应遵循 lailai's Text Format Guide。
代码
- HTML、CSS、JavaScript、TypeScript、JSON 代码风格应遵循 Prettier。
{
"printWidth": 80,
"singleQuote": true,
"trailingComma": "es5"
}