vscodeの個人設定

.vscodeディレクトリでsettings.jsonの構成を設定します

{
  // tab设置
  "editor.tabSize": 2,
  // 搜索时不包括的文件夹
  "search.exclude": {
    "**/node_modules": true,
    "**/bower_components": true,
    "**/dist": true
  },
  // vetur: vscode保存代码自动换行的设置
  "vetur.format.defaultFormatter.html": "js-beautify-html",
  "vetur.format.defaultFormatterOptions": {
    "js-beautify-html": {
      "wrap_line_length": 120,
      "wrap_attributes": "auto",
      "end_with_newline": false
    }
  },
  //----------------------------------------上面是常用的固定配置------------
  //autoFixedOnSave 设置已废弃,采用如下新的设置
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "eslint.format.enable": true,
  //autoFix默认开启,只需输入字符串数组即可
  "eslint.validate": [
    "javascript",
    "vue",
    "html"
  ],
}

1.コードフォーマットプラグイン

  • スリング

おすすめ

転載: blog.csdn.net/a519991963/article/details/115315265