VSCode 开发Vue 代码格式化setting.json设置

摘要:
//重置tabsize“editor.tabsize”:{“language”://是否插入冒号“stylusSupreme.insertSemicolons”://插入大括号“stylus Supreme.isertNewLineAround Imports”://导入后是否换行“stylusSupreme/insertNewLineAround Blocks”:
 

VSCode 开发Vue 代码格式化setting.json设置第1张

{
    // vscode默认启用了根据文件类型自动设置tabsize的选项
    "editor.detectIndentation": false,
    // 重新设定tabsize
    "editor.tabSize": 2,
    // #每次保存的时候将代码按eslint格式进行修复
    "eslint.autoFixOnSave": true,
    // 添加 vue 支持
    "eslint.validate": [
      "javascript",
      "javascriptreact",
      {
        "language": "vue",
        "autoFix": true
      }
    ],
    //  #让prettier使用eslint的代码格式进行校验 
    "prettier.eslintIntegration": true,
    //  #去掉代码结尾的分号 
    "prettier.semi": true,
    //  #使用单引号替代双引号 
    "prettier.singleQuote": true,
    //  #让函数(名)和后面的括号之间加个空格
    "javascript.format.insertSpaceBeforeFunctionParenthesis": false,
    // #让vue中的js按编辑器自带的ts格式进行格式化 
    "vetur.format.defaultFormatter.js": "vscode-typescript",
    // 格式化stylus, 需安装Manta's Stylus Supremacy插件
    "stylusSupremacy.insertColons": false, // 是否插入冒号
    "stylusSupremacy.insertSemicolons": false, // 是否插入分好
    "stylusSupremacy.insertBraces": false, // 是否插入大括号
    "stylusSupremacy.insertNewLineAroundImports": false, // import之后是否换行
    "stylusSupremacy.insertNewLineAroundBlocks": false,
    "files.associations": {
      "*.cjson": "jsonc",
      "*.wxss": "css",
      "*.wxs": "javascript"
    },
    "emmet.includeLanguages": {
      "wxml": "html"
    },
    "[html]": {
      "editor.defaultFormatter": "lonefy.vscode-JS-CSS-HTML-formatter"
    },
    "minapp-vscode.disableAutoConfig": true,
    "editor.codeActionsOnSave": {
      "source.fixAll.eslint": true
    },
    "eslint.alwaysShowStatus": true,
    "eslint.codeAction.disableRuleComment": {},
    "editor.formatOnSave": true,
    "css.fileExtensions": [
      "css",
      "scss"
    ],
    "window.zoomLevel": 1,
    "workbench.colorTheme": "Darcula - WebStorm Edition",
    "files.autoSave": "onFocusChange",
    "svn.default.encoding": "",
    "javascript.updateImportsOnFileMove.enabled": "always",
    "settingsSync.ignoredExtensions": [
    
    ] // 两个选择器中是否换行
  }

免责声明:文章转载自《VSCode 开发Vue 代码格式化setting.json设置》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇kali中的postgres怎么连接迁移设备存储报的错误及解决方式下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

关于nodejs中遇到mysql默认8小时连接断开机制的终极简单解决方案

由于mysql默认8小时连接无访问,就会断开.为此查了一下资料,有同种比较简单的解决方案: 1. 增加 MySQL 的 wait_timeout 属性的值。  修改 /etc/mysql/my.cnf文件,在 [mysqld] 节中设置: # Set a connection to wait 8hours in idle status.  wait_tim...

SpringBoot全局配置文件

SpringBoot项目使用一个全局的配置文件application.properties或者是application.yml,在resources目录下或者类路径下的/config下,一般我们放到resources下。 1、修改tomcat的端口为8088 server.port=8088 重新启动应用,查看效果: 2018-09-18 20:55:06...

分享一个递归无限级拼接Json的方法---ExtJs的TreePanel和TreeGrid均适用(Ef,Lambda,Linq,IQueryable,List)

话不多说,先上实体类,如果你不是codefirst,就把它当成数据表结构。 下面是底层BaseDal获取数据的方法  (如果你没有Base类,直接写在你的DAL层和BLL层) 下面是BaseService的方法 下面方法用于拼接字符串 主体方法-- /// <summary> /// 得到****TreeGrid****...

前端-网页打印-Jqprint-网页打印像素设置

Jqprint 实现网页打印: (转自:http://www.jq22.com/jquery-info347) 引入jqorint: <script language="javascript" src="jquery-1.4.4.min.js"></script> <script language="javascript" s...

分解uber依赖注入库dig-使用篇

golang的依赖注入库非常的少,好用的更是少之又少,比较好用的目前有两个 谷歌出的wire,这个是用抽象语法树在编译时实现的。 uber出的dig,在运行时,用返射实现的,并基于dig库,写了一个依赖框架fx 本系列分几部分,先对dig进行分析,第一篇介绍dig的使用,第二篇再从源码来剖析他是如何通过返射实现的的依赖注入的,后续会介绍fx 的使用和...

ElasticSearch安装拼音插件(pinyin)

环境介绍 集群环境如下: Ubuntu14.04 ElasticSearch 2.3.1(3节点) JDK1.8.0_60 开发环境: Windows10 JDK 1.8.0_66 Maven 3.3.3 Intellij IDEA 2016.1 下载编译Pinyin clone elasticsearch-analysis-pinyin 通过...