eslint 批量修復文件問題

今天使用 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

搞定!

Ref: npm run prettier:check fails with exit status 1

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章