您当前的位置: 首页 >  vscode

任磊abc

暂无认证

  • 4浏览

    0关注

    182博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

vscode编辑器个人性化配置,用于vue、react+eslint代码规范

任磊abc 发布时间:2020-06-05 17:48:40 ,浏览量:4

vscode是编辑器setting.json配置

{
  "workbench.sideBar.location": "left",
  "editor.fontSize": 18,
  "editor.tabSize": 2,
  "editor.formatOnSave": true, //每次保存自动格式化(在vue项目中可能需要关闭掉)
  "editor.formatOnType": true,
  "editor.snippetSuggestions": "top",
  // Controls whether format on paste is on or off
  "editor.formatOnPaste": true,
  "window.zoomLevel": 1,
  "atomKeymap.promptV3Features": true,
  "vetur.format.defaultFormatter.html": "js-beautify-html",
  "editor.multiCursorModifier": "ctrlCmd",
  "files.autoSave": "off",
  "editor.detectIndentation": false, //缩进
  "vetur.validation.template": false, //遍历时报错
  "explorer.confirmDragAndDrop": false, // 2019-1-7添加
  "editor.wordWrap": "on", //换行
  "terminal.integrated.shell.windows": "D:\\git\\Git\\bin\\bash.exe", //配置git终端
  "team.showWelcomeMessage": false, //scss报错
  "emmet.syntaxProfiles": {
    "vue-html": "html",
    "vue": "html"
  },
  "html.format.wrapAttributes": "force-aligned",
  // 文件顶部注释
  "fileheader.customMade": {
    "Author": "renlei",
    "Date": "Do not edit", // 文件创建时间(不变)
    "LastEditors": "renlei", // 文件最后编辑者
    "LastEditTime": "Do not edit", // 文件最后编辑时间
    "Description": "" //描述
  },
  // 函数注释
  "fileheader.cursorMode": {
    "name": "handle",
    "description": "",
    "param": ":{ type }",
    "return": ""
  },
  "eslint.options": {
    "parserOptions": {
      "ecmaVersion": 6,
      "ecmaFeatures": {
        "jsx": true
      }
    }
  },
  "emmet.includeLanguages": {
    "javascript": "javascriptreact",
    "aspx": "html"
  },
  "emmet.triggerExpansionOnTab": true,
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "typescript",
    "typescriptreact",
    "html",
    "vue",
    "jsx"
  ],
  "prettier.singleQuote": false,
  "prettier.semi": true,
  // "vetur.format.defaultFormatterOptions": {
  //     "wrap_attributes": "force-aligned"
  // },
  //这是大括号后不换行
  "beautify.config": {
    "brace_style": "collapse,preserve-inline"
  },
  // Set backgroundColor
  "highlight-icemode.backgroundColor": "red",
  // Set Border Color
  "highlight-icemode.borderColor": "blue",
  "vetur.format.defaultFormatter.js": "vscode-typescript",
  "vetur.format.defaultFormatterOptions": {
    "js-beautify-html": {
      "wrap_attributes": "force-aligned" // 可以换成上面任意一种value
    }
  },
  //html行内样式提示
  "editor.parameterHints": true,
  "editor.quickSuggestions": {
    "other": true,
    "comments": true,
    "strings": true
  },
  "[less]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[scss]": {
    "editor.defaultFormatter": "michelemelluso.code-beautifier"
  },
  "[css]": {
    "editor.defaultFormatter": "michelemelluso.code-beautifier"
  },
  "[json]": {
    "editor.defaultFormatter": "vscode.json-language-features"
  },
  "vsicons.dontShowNewVersionMessage": true,
  "[php]": {
    "editor.defaultFormatter": "bmewburn.vscode-intelephense-client"
  },
  "[jsonc]": {
    "editor.defaultFormatter": "vscode.json-language-features"
  },
  "[typescript]": {
    "editor.defaultFormatter": "vscode.typescript-language-features"
  },
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "editor.suggest.snippetsPreventQuickSuggestions": false,
  "update.mode": "none",
  "typescript.disableAutomaticTypeAcquisition": true,
  "[vue]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "workbench.colorTheme": "Dracula",
  "javascript.updateImportsOnFileMove.enabled": "always"
}

 

关注
打赏
1656830895
查看更多评论
立即登录/注册

微信扫码登录

0.0345s