VSCode 配置

{
"window.zoomLevel": 0,
"editor.fontSize": 14,
"editor.minimap.enabled": true,
"editor.lineNumbers": "on", //开启行数提示
"editor.renderWhitespace": "none",
"editor.tabSize": 4,
// vscode默认启用了根据文件类型自动设置tabsize的选项
"editor.detectIndentation": false,
// #每次保存的时候自动格式化
"editor.formatOnSave": false,

"eslint.enable": true,
"eslint.alwaysShowStatus": true,
"eslint.packageManager": "yarn",
"eslint.autoFixOnSave": true,
"eslint.options": {
    "extensions": [".js", ".vue"]
},
// 添加 vue 支持
"eslint.validate": [
    "javascript",
    "javascriptreact",
    {
        "language": "vue",
        "autoFix": true
    },
    {
        "language": "html",
        "autoFix": true
    },
],

//  #让prettier使用eslint的代码格式进行校验
"prettier.eslintIntegration": true,
//  #去掉代码结尾的分号
"prettier.semi": false,
//  #使用带引号替代双引号
"prettier.singleQuote": true,
//  #让函数(名)和后面的括号之间加个空格
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
// #这个按用户自身习惯选择
"vetur.format.defaultFormatter.html": "js-beautify-html",
// #让vue中的js按编辑器自带的ts格式进行格式化
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatterOptions": {
    "js-beautify-html": {
        "wrap_attributes": "force-aligned"
        // #vue组件中html代码格式化样式
    }
},

}

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 参考:http://blog.csdn.net/c_duoduo/article/details/51615381...
    dpneko阅读 3,848评论 0 0
  • 今天下午刷了一遍VS Code的设置。原因是,点击注释时很大机率会弹出“Request textDocument/...
    一切知行合一阅读 8,173评论 2 0
  • 0x00 我点电脑上已经安装了CTeX中文套装的全套组件,由《LaTeX 2e完全学习手册》中附带的光盘资源提供。...
    Azur_wxj阅读 13,596评论 1 2
  • 前置知识 首先说明一下,vscode 为我们提供了两种设置方式: User Settings(用户设置):全局设置...
    Whyn阅读 36,285评论 1 29
  • 前言 VScode是一个相当优秀的IDE,具备开源、跨平台、模块化、插件丰富、启动时间快、颜值高、可高度定制等等优...
    浪晋阅读 60,945评论 6 65