关于编译器代码格式化问题
问题1 :Expected indentation of 0 spaces but found 2. (indent)
解决方案:
1.不校验缩进,在rule里增加如下规则:
'rules': {
'indent': 'off'
}
2.修改IDEA或webstorm配置,File => Setting => Editor => Code Style => HTML,找到 add Do not indent children of 的选项,添加 script 标签就完美解决缩进问题
问题2:空格不一致,比如:声明函数data() ,es6应该是data (),少了个空格
解决方案:修改IDEA或webstorm配置,File => Setting => Editor => Code Style => JavaScript,然后在tab栏,切换到spaces,通过勾选完成你想要的空格配置。