eslint语法错误解决方法
检查语法形式并将其规范化是件好事,但这种检查也太非人了
错误如下。
f :vue-sourcemock test2 srcmockindex.js
1:1 errorexpectedspaceortabafter‘//‘incommentspaced-comment
4:1 errorexpectedspaceortabafter‘//‘incommentspaced-comment
5:27 erroraspaceisrequiredafter‘,‘comma-spacing’。
5:33 erroraspaceisrequiredafter‘,‘comma-spacing’。
6:1 errorexpectedindentationof 2空间缓冲区4索引
7:1 errorexpectedindentationof 2空间缓冲区4索引
8:1 errorexpectedindentationof 2空间缓冲区4索引
9:1 errorexpectedindentationof 4空间布局8索引
10:1 errorexpectedindentationof 4空间布局8索引
1:1 errorexpectedindentationof 4空间布局8索引
12:1 errorexpectedindentationof 4空间布局8索引
13:1 errorexpectedindentationof 2空间缓冲区4索引
14:3 errornewlinerequiredatendoffilebutnotfoundeol-last
解决方案:
在vue项目根目录下使用vue.config.js文件直接关闭eslint
vue.config.js
module.exports={
lintOnSave: false
}
这次不直接用XDD的愤怒!
译文: 3359 www.cn blogs.com/light ice/p/12896130.html