Vue中使用ESlint出现的格式问题总结

久未见 提交于 2020-03-06 01:22:54

最近使用vue做项目的时候,每次运行程序都会出现很多格式问题,有的问题可以很简单的看明白,例如:Expected indentation of 8 spaces but found 10,删掉两个空格就可以,还有一些不明白在说什么,在此做一个总结:

  1. Closing curly brace does not appear on the same line as the subsequent block.意思是右括号需要跟下一个代码块在同一行
  2. Failed to mount component: template or render function not defined.Vue文件中template内需要包裹起来,一般使用div
  3. Block must not be padded by blank lines.多了空行,需要删掉
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!