vscode常用插件和配置

常用插件(vscode)

vscode常用配置圖
vscode常用配置圖

settings.json(vscode)

{
  "editor.tabSize": 2, // 製表符符號eslint
  "editor.fontSize": 14, // vscode字體大小
  "editor.quickSuggestions": {
    "other": true,
    "comments": true,
    "strings": true
  },
  // eslint 格式化配置
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    {
      "language": "html",
      "autoFix": true
    },
    {
      "language": "vue",
      "autoFix": true
    }
  ],
  "editor.formatOnSave": true, // 每次保存自動格式化
  "eslint.autoFixOnSave": true, // 每次保存的時候將代碼按eslint格式進行修復
  "vetur.format.defaultFormatter.html": "js-beautify-html",
  "vetur.format.defaultFormatter.js": "vscode-typescript", //讓vue中的js按編輯器自帶的ts格式進行格式化
  "vetur.format.defaultFormatterOptions": {
    "prettier": {
      "singleQuote": true, //使用單引號替代雙引號
      "semi": false, //去掉代碼結尾的分號
      "eslintIntegration": true // 讓prettier使用eslint的代碼格式進行校驗
    },
    "js-beautify-html": {
      "wrap_attributes": "force-aligned" //屬性強制折行對齊
    }
  },
  "javascript.format.insertSpaceBeforeFunctionParenthesis": true, //讓函數(名)和後面的括號之間加個空格
  // fileHeader配置
  "fileheader.customMade": {
    "Description": "",
    "Author": "Anles",
    "Motto": "A madman with dreams",
    "Github": "https://github.com/122177638",
    "Date": "Do not edit",
    "LastEditors": "Anles",
    "LastEditTime": "Do not edit"
  },
}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章