eslint warning Delete `␍` prettier/prettier


如圖,從git上拉下來的代碼一直報 warning Deleteprettier/prettier

解決辦法
  1. 執行npm run lint --fix ,修復warning
  2. 執行 git config --global core.autocrlf false 關掉 git 自動轉換
原因

window系統中,clone代碼下來,git 會自動把換行符LF(linefeed character) 轉換成回車符CRLF(carriage-return character)。這時候我們本地的代碼都是回車符。

參考文章

warning Delete prettier/prettier(eslint配置的一些問題)

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