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

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