今天使用 AntDesignPro , git 提交報錯
npm found some errors. Please fix them and try committing again.
經查發現是 ant 使用了 husky 和 prettier 保證代碼格式一致性,代碼中有問題。
一個個問題修復了之後,還是有個 windows 與 linux 的回車換行不一致的問題,由於量比較大,一個個修復起來比較麻煩。
所以執行命令
npm lint:prettier -fix
發現還是報錯,總是中斷,exit status 1
遂執行:
npm run lint:fix
搞定!