FishHawk / auto-novel

轻小说机翻网站,支持网络小说/文库小说/本地小说
https://books.fishhawk.top/
GNU General Public License v3.0
238 stars 28 forks source link

chore(web): add pre-commit hook for code formatting #54

Closed IronKinoko closed 1 month ago

IronKinoko commented 1 month ago

提交前对改动的内容自动进行 prettier 格式化

后续代码更改都会以 .prettierrc 里的配置为准,你看下是否需要调整这个配置文件,修改成自己喜欢的样式

FishHawk commented 1 month ago

ok,还是按照旧的prettierrc设置。

另外"prepare": "cd .. && husky web/.husky"这里,为啥要到上一层目录?

IronKinoko commented 1 month ago

https://typicode.github.io/husky/how-to.html#project-not-in-git-root-directory

文档里这么写的

FishHawk commented 1 month ago

husky

看到了