vue-WebStorm报错设置

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

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

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

解决:

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

效果:

vue-WebStorm报错设置_第2张图片

2 ESLint格式校验出现错误

json类型缩进对齐

申明方法报错

vue-WebStorm报错设置_第3张图片

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

 

 

你可能感兴趣的:(vue)