懒人使用vscode方法

115 阅读1分钟

50a2de97444cb399ac6edb254cd9f2254810d736.gif

vscode

打开vs code的 setting.json文件,里面包括些eslint、主题、字体等

// setting.json
{
  "workbench.iconTheme": "vscode-icons",
  "diffEditor.ignoreTrimWhitespace": false,
  "editor.formatOnSave": true,
  "[html]": {
    "editor.defaultFormatter": "vscode.html-language-features"
  },
  "[typescriptreact]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "eslint.format.enable": true,
  "liveServer.settings.CustomBrowser": "chrome",
  "liveServer.settings.donotShowInfoMsg": true,
  "liveServer.settings.donotVerifyTags": true,
  "editor.suggest.snippetsPreventQuickSuggestions": false,
  "vsicons.dontShowNewVersionMessage": true,
  "editor.renderWhitespace": "none",
  "quokka.colors": {
    "covered": "#62b455",
    "errorPath": "#ffa0a0",
    "errorSource": "#fe536a",
    "notCovered": "#cccccc",
    "partiallyCovered": "#d2a032"
  },
  "quokka.darkTheme.error.decorationAttachmentRenderOptions": {
    "border": null,
    "borderColor": null,
    "fontStyle": null,
    "fontWeight": null,
    "textDecoration": null,
    "color": "#fe536a",
    "backgroundColor": null,
    "margin": "1.2em",
    "width": null,
    "height": null
  },
  // 自动修复
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
    // "source.organizeImports": true  // 在保存时,自动调整 import 语句相关顺序,能够让你的 import 语句按照字母顺序进行排列
  },
  "eslint.enable": true, //是否开启vscode的eslint
  // 配置 ESLint 检查的文件类型
  "eslint.validate": ["typescript", "react", "html"],
  "eslint.options": {
    //指定vscode的eslint所处理的文件的后缀
    "extensions": [".js", ".vue", ".ts", ".tsx"]
  },
  "minapp-vscode.disableAutoConfig": true,
  "editor.detectIndentation": false,
  // 重新设定tabsize
  "editor.tabSize": 4,
  //  #去掉代码结尾的分号
  "prettier.semi": false,
  //  #使用单引号替代双引号
  "prettier.singleQuote": false,
  "workbench.colorTheme": "GitHub Dark Dimmed"
}