chore: 提交时自动格式化代码
- 安装 husky (^9.1.7) 和 lint-staged (^16.2.7) - 配置 pre-commit hook 自动运行 Prettier - 创建 .prettierignore 排除不需要格式化的文件
This commit is contained in:
4
.gitattributes
vendored
4
.gitattributes
vendored
@@ -7,6 +7,10 @@
|
||||
*.yaml text eol=lf
|
||||
*.css text eol=lf
|
||||
*.html text eol=lf
|
||||
*.sh text eol=lf
|
||||
|
||||
# Husky hooks 必须使用 LF
|
||||
.husky/* text eol=lf
|
||||
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
|
||||
Reference in New Issue
Block a user