1. 程式人生 > >Line 10 exceeds the maximum line length of 80

Line 10 exceeds the maximum line length of 80

image mage 進行 文件夾 ron lin 就是 js文件 文件中

在vue-cli的組件中,有一段較長的文字,ESLint報錯:Line 10 exceeds the maximum line length of 80 ,ESLint設置一行編碼最多不能超過80字符。

解決:

 在文件夾中有個設置ESLint語法的js文件.eslintrc.js

技術分享圖片

文件中,rules這個對象中,就是配置的ESlint 語法檢測規則。

可根據自己需要對一行的編碼量進行設置,具體的設置方法可參考:https://home.cnblogs.com/blog/。

Line 10 exceeds the maximum line length of 80