VSCODE的setting.json配置

本文详细介绍了Visual Studio Code的setting.json配置文件,包括如何自定义编辑器设置、扩展配置以及工作区特定设置,帮助前端开发者提升开发效率。
摘要由CSDN通过智能技术生成
{
  // 自动保存
  "files.autoSave": "afterDelay",
  "editor.tabSize": 2,
  "beautify.tabSize": 2,
  "emmet.triggerExpansionOnTab": true,
  "emmet.includeLanguages": {
    "vue-html": "html",
    "vue": "html",
    "javascript": "javascriptreact"
  },
  "sync.gist": "32da994c7afbb81eff2a39bd667cba0d",
  // "sync.lastUpload": "2018-08-20T07:06:11.737Z",
  "sync.autoDownload": false,
  "sync.autoUpload": false,
  // "sync.lastDownload": "2018-03-21T04:35:35.789Z",
  "sync.forceDownload": false,
  // "sync.host": "",
  // "sync.pathPrefix": "",
  "sync.quietSync": false,
  "sync.askGistName": false,
  "editor.wordWrap": "on",
  "files.associations": {
    "*.vue": "vue"
    // "*.json": "json"
  },
  "editor.quickSuggestions": {
    "other": true,
    "comments": true,
    "strings": true
  },
  "files.exclude": {
    "**/*.css": {
      "when": "$(basename).less"
    },
    "**/*.css.map": true,
    "**/*.js.map": true,
    "**/**.js": {
      "when": "$(basename).ts"
    },
    "node_modules": true
  },
  "path-autocomplete.extensionOnImport": true,
  "less.compile": {
    "compress": true, // true => remove surplus whitespace
    "sourceMap": true, // true => generate source maps (.css.map files)
    "out": true // false => DON'T output .css files (overridable per-file, see below)
  },
  "sync.removeExtensions": true,
  "sync.syncExtensions": true,
  "editor.formatOnPaste": true,
  "editor.formatOnSave": true,
  // "eslint.provideLintTask": true,
  // "eslint.packageManager": "npm",
  // "eslint.options": {
  //   "configFile": "E:/xmapp/htdocs/erplib/.eslintrc.js",
  //   // "configFile": "E:/xampp/htdocs/g7sx/vue_boot_on_g7s/.eslintrc.js",
  //   // "configFile": "D:/mysite/policy-new2019/.eslintrc.js",
  //   // "configFile": "E:/xampp/htdocs/iview-text/.eslintrc.js",
  //   // "configFile": "D:/mysite/policy-mobi/.eslintrc.js"
  //   // "plugins": ["html", "vue"]
  // },
  // "eslint.run": "onSave",
  // "eslint.autoFixOnSave": true,
  // "eslint.workingDirectories": ["./src"],
  "prettier.singleQuote": true,
  // "prettier.semi": true,
  // "prettier.trailingComma": "all",
  // "prettier.eslintIntegration": true,
  // "vetur.format.defaultFormatter.js": "vscode-typescript",
  // 使用插件格式化 html
  // "vetur.format.defaultFormatter.html": "prettier",
  // "vetur.validation.template": false,
  // 格式化插件的配置
  // "vetur.format.defaultFormatterOptions": {
  //   "js-beautify-html": {
  //     // 属性强制折行对齐
  //     // "wrap_attributes": "force-aligned",
  //   }
  // },
  "workbench.colorTheme": "Atom One Dark",
  "vetur.validation.template": false,
  "liveServer.settings.donotShowInfoMsg": true,
  "git.autofetch": true,
  // "prettier.disableLanguages": ["vue", "js", "tsx", "ts"],
  "liveServer.settings.donotVerifyTags": true,
  "typescript.updateImportsOnFileMove.enabled": "always",
  // "prettier.eslintIntegration": true,
  "vetur.format.defaultFormatter.js": "none",
  "vetur.validation.script": false,
  // "javascript.preferences.quoteStyle": "single",
  //autoFixedOnSave 设置已废弃,采用如下新的设置
  "eslint.lintTask.enable": true,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  //autoFix默认开启,只需输入字符串数组即可
  "eslint.validate": ["javascript", "vue", "html"],
  "eslint.format.enable": true,
  "eslint.probe": [
    "javascript",
    "typescript",
    "typescriptreact",
    "html",
    "vue"
  ],
  "editor.suggest.snippetsPreventQuickSuggestions": false,
  "workbench.sideBar.location": "left",
  "snippets-view.flatten": false,
  "git.enableSmartCommit": true,
  "workbench.startupEditor": "newUntitledFile",
  "sync.forceUpload": true,
  "[javascript]": {
    "editor.defaultFormatter": "dbaeumer.vscode-eslint"
  },
  "[vue]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "git.ignoreWindowsGit27Warning": true,
  "editor.foldingStrategy": "indentation",
  "[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "git.ignoreRebaseWarning": true,
  "window.zoomLevel": 3,
  "[css]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[jsonc]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "tabnine.experimentalAutoImports": true,
  "bracket-pair-colorizer-2.depreciation-notice": false
  // "eslint.options": {
  //   "configFile": "E:/xmapp/htdocs/erplib/.eslintrc.js"
  // }
  // "eslint.validate": [
  //   "javascript",
  //   "javascriptreact",
  //   {
  //     "language": "html",
  //     "autoFix": true
  //   },
  //   {
  //     "language": "vue",
  //     "autoFix": true
  //   }
  // ],
  // "javascript.format.insertSpaceAfterKeywordsInControlFlowStatements": false,
  // "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false,
  // "javascript.format.insertSpaceAfterCommaDelimiter": false,
  // "javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
  // "javascript.format.insertSpaceAfterSemicolonInForStatements": false,
  // "javascript.format.insertSpaceBeforeAndAfterBinaryOperators": false
  // "javascript.format.enable": false,
  // "html.format.enable": false
  //packinstall eslint安装依赖
  //"babel-eslint": "^8.0.1",
  // "eslint": "^5.14.1",
  //   "eslint-config-airbnb-base": "^12.0.0",
  //   "eslint-config-standard": "^11.0.0",
  //   "eslint-friendly-formatter": "^3.0.0",
  //   "eslint-import-resolver-webpack": "^0.8.3",
  //   "eslint-loader": "^1.9.0",
  //   "eslint-plugin-html": "^3.2.2",
  //   "eslint-plugin-import": "^2.9.0",
  //   "eslint-plugin-node": "^6.0.1",
  //   "eslint-plugin-promise": "^3.7.0",
  //   "eslint-plugin-standard": "^3.0.1",
  //   "eslint-plugin-vue": "^4.3.0",
}
{
  //随窗口自动换行
  "editor.wordWrap": "on",
  //主题
  "workbench.colorTheme": "Atom One Dark",
  "editor.quickSuggestions": {
    "strings": true
  },
  //窗口默认放大
  "window.zoomLevel": 2,
  "[javascript]": {
    "editor.defaultFormatter": "vscode.typescript-language-features"
  },
  "[css]": {
    "editor.defaultFormatter": "michelemelluso.code-beautifier"
  },
  "files.autoSave": "afterDelay",
  "editor.suggestSelection": "first",
  "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
  "[html]": {
    "editor.defaultFormatter": "HookyQR.beautify"
  },
  // 本地配备eslint
  //自动保存的时候,eslint自动修复一些格式上的错误
  "eslint.alwaysShowStatus": true,
  // "eslint.autoFixOnSave": true,
  // 每次保存的时候将代码按eslint格式进行修复
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "explicit"
  },
  "eslint.options": {
    "extensions": [".js", ".vue"]
  },
  "eslint.validate": [
    "javascript",
    {
      "language": "vue",
      "autoFix": true
    },
    "html",
    "vue"
  ],
  "emmet.includeLanguages": {
    "javascript": "html",
    "wxml": "html",
    "axml": "xml"
  },
  "git.autofetch": true,

  "[vue]": {
    "editor.defaultFormatter": "octref.vetur"
  },
  "workbench.colorCustomizations": {},
  // 关闭eslint
  // "eslint.enable": false,

  // tab一键成元素html标签
  "emmet.triggerExpansionOnTab": true,
  "files.associations": {
    "*.cjson": "jsonc",
    "*.wxss": "css",
    "*.wxs": "javascript"
  },
  "minapp-vscode.disableAutoConfig": true,
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  // 当保存代码的时候,会自动格式化
  "editor.formatOnSave": true,
  // 不添加分号
  "prettier.semi": false,
  // 使用单引号
  "prettier.singleQuote": true,
  // 解决Vue换行问题
  "vetur.format.defaultFormatter.html": "js-beautify-html",
  "vetur.format.defaultFormatter.js": "vscode-typescript", //解决配置默认格式化 js换行问题
  "vetur.format.defaultFormatterOptions": {
    "js-beautify-html": {
      "wrap_attributes": "auto"
    },
    "prettyhtml": {
      "printWidth": 100,
      "singleQuote": false,
      "wrapAttributes": false,
      "sortAttributes": false
    }
  },
  "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "tabnine.experimentalAutoImports": true,
  "editor.wordWrap": "on"
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值