vue-WebStorm报错设置

vue 关闭vue项目中烦死人的ESlint

https://blog.****.net/qq_36888550/article/details/79815195

1 错误expected indentation of 0 spaces but found 2 . vue eslint规则和WebStorm冲突

vue-WebStorm报错设置

解决:

修改IDEA或webstorm配置,File => Setting => Editor => Code Style => HTML,找到 add Do not indent children of 的选项,添加 script 标签就完美解决缩进问题。 
vue-WebStorm报错设置

效果:

vue-WebStorm报错设置

2 ESLint格式校验出现错误

json类型缩进对齐

vue-WebStorm报错设置

申明方法报错

vue-WebStorm报错设置

解决:使用快捷键 ctrl+alt+L 格式化代码