vscode 格式化代码



出现错误,会自动添加分号,解决办法先安装prettier插件,然后对setting.json添加如下设置

"vetur.format.defaultFormatterOptions": {
    "prettier": {
      "semi": false, // 格式化不加分号
      "singleQuote": true // 格式化以单引号为主
    }
  }

猜你喜欢

转载自blog.csdn.net/Y17868877685/article/details/89433847