使用ctrl+alt+L格式化vue代码后,如果开启了eslint检查,会在script标签下看到一堆红色报警,通过下面的配置可以解决自动格式化后的这个问题。
File => Setting => Editor => Code Style => HTML,找到Other选项卡,Do not indent children of 的选项,添加 script 标签。
然后再使用快捷键ctrl+alt+L格式化就不会有这个问题了。
WebStorm格式化vue错误解决 Expected indentation of 0 spaces but found 2

相关文章:

  • 2021-07-29
  • 2022-01-03
  • 2021-04-25
  • 2021-12-28
  • 2021-12-31
  • 2022-12-23
  • 2021-10-18
  • 2021-12-21
猜你喜欢
  • 2021-09-02
  • 2022-01-19
  • 2021-10-21
  • 2021-04-08
  • 2022-12-23
  • 2021-06-17
相关资源
相似解决方案