zoukankan      html  css  js  c++  java
  • vetru自动格式化

    vue文件和json文件

    {
        "window.zoomLevel": 2,
    	"eslint.autoFixOnSave": true,
    	"eslint.validate": [
    		//验证文件类型
    		"javascript",
            "vue",
            "ts",
            "tsx",
    		{
    			"language": "vue",
    			"autoFix": true
            },
            {
    			"language": "ts",
    			"autoFix": true
            },
            {
    			"language": "tsx",
    			"autoFix": true
            },
            {
    			"language": "jsx",
    			"autoFix": true
    		}
    	],
    	"editor.formatOnSave": true,
    	"editor.tabSize": 4, // 重新设定tabsize
    	"javascript.format.enable": false,
    	"editor.detectIndentation": false,
    	"[vue]": {
    		"editor.defaultFormatter": "esbenp.prettier-vscode"
    	},
    	"[html]": {
    		"editor.defaultFormatter": "vscode.html-language-features"
    	},
    	"[javascript]": {
    		"editor.defaultFormatter": "esbenp.prettier-vscode"
        },
        "[typescript]": {
    		"editor.defaultFormatter": "esbenp.prettier-vscode"
    	},
    	"editor.renderControlCharacters": true,
    	"editor.renderWhitespace": "all",
    	"editor.codeActionsOnSave": {
    		"source.fixAll.eslint": false
        },
        "editor.fontSize": 14,
        "window.zoomLevel": 1,
        "files.associations": {
            "*.cjson": "jsonc",
            "*.wxss": "css",
            "*.wxs": "javascript"
        },
        "emmet.includeLanguages": {
            "wxml": "html"
        },
        "minapp-vscode.disableAutoConfig": true,
        "editor.tokenColorCustomizations": null,
        "editor.semanticTokenColorCustomizations": null,
        "notebook.kernelProviderAssociations": [
        
        ]
    }
    

    react+TS文件

    {
        "editor.codeActionsOnSave": {
          "source.fixAll.eslint": true
        },
        "[javascript]": {
          "editor.defaultFormatter": "esbenp.prettier-vscode",
          "editor.formatOnPaste": true,
          "editor.formatOnSave": true
        },
        "[json]": {
          "editor.defaultFormatter": "esbenp.prettier-vscode"
        },
        "[typescript]": {
          "editor.defaultFormatter": "esbenp.prettier-vscode",
          "editor.formatOnPaste": true,
          "editor.formatOnSave": true
        },
        "[typescriptreact]": {
          "editor.defaultFormatter": "esbenp.prettier-vscode",
          "editor.formatOnPaste": true,
          "editor.formatOnSave": true
        },
        "typescript.tsdk": "node_modules/typescript/lib"
      }
    

    合并两者,兼容了vue和 react+typescript

    {
        "window.zoomLevel":1,
        "eslint.autoFixOnSave":true,
        "eslint.validate":[
            "javascript",
            "vue",
            "ts",
            "tsx",
            {
                "language":"vue",
                "autoFix":true
            },
            {
                "language":"ts",
                "autoFix":true
            },
            {
                "language":"tsx",
                "autoFix":true
            },
            {
                "language":"jsx",
                "autoFix":true
            }
        ],
        "editor.formatOnSave":true,
        "editor.tabSize":4,
        "javascript.format.enable":false,
        "editor.detectIndentation":false,
        "[vue]":{
            "editor.defaultFormatter":"esbenp.prettier-vscode"
        },
        "[html]":{
            "editor.defaultFormatter":"vscode.html-language-features"
        },
        "[json]":{
            "editor.defaultFormatter":"esbenp.prettier-vscode"
        },
        "[javascript]":{
            "editor.defaultFormatter":"esbenp.prettier-vscode",
            "editor.formatOnPaste":true,
            "editor.formatOnSave":true
        },
        "[typescript]":{
            "editor.defaultFormatter":"esbenp.prettier-vscode",
            "editor.formatOnPaste":true,
            "editor.formatOnSave":true
        },
        "[typescriptreact]":{
            "editor.defaultFormatter":"esbenp.prettier-vscode",
            "editor.formatOnPaste":true,
            "editor.formatOnSave":true
        },
        "editor.renderControlCharacters":true,
        "editor.renderWhitespace":"all",
        "editor.codeActionsOnSave":{
            "source.fixAll.eslint":true
        },
        "editor.fontSize":14,
        "files.associations":{
            "*.cjson":"jsonc",
            "*.wxss":"css",
            "*.wxs":"javascript"
        },
        "emmet.includeLanguages":{
            "wxml":"html"
        },
        "minapp-vscode.disableAutoConfig":true,
        "editor.tokenColorCustomizations":null,
        "editor.semanticTokenColorCustomizations":null,
        "notebook.kernelProviderAssociations":[
    
        ]
    }
    
  • 相关阅读:
    hihoCoder #1062 : 最近公共祖先·一
    hihoCoder #1050 : 树中的最长路
    hihoCoder #1049 : 后序遍历
    108 Convert Sorted Array to Binary Search Tree 将有序数组转换为二叉搜索树
    107 Binary Tree Level Order Traversal II 二叉树的层次遍历 II
    106 Construct Binary Tree from Inorder and Postorder Traversal 从中序与后序遍历序列构造二叉树
    105 Construct Binary Tree from Preorder and Inorder Traversal 从前序与中序遍历序列构造二叉树
    104 Maximum Depth of Binary Tree 二叉树的最大深度
    102 Binary Tree Level Order Traversal 二叉树的层次遍历
    101 Symmetric Tree 判断一颗二叉树是否是镜像二叉树
  • 原文地址:https://www.cnblogs.com/xiaozhumaopao/p/14333599.html
Copyright © 2011-2022 走看看