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

https://blog.csdn.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 格式化代码 

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-04-02
  • 2021-10-10
猜你喜欢
  • 2021-12-09
  • 2022-12-23
  • 2022-01-16
  • 2022-01-29
  • 2022-12-23
  • 2021-11-03
  • 2022-12-23
相关资源
相似解决方案