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":[
    
        ]
    }
    
  • 相关阅读:
    bzoj1027
    bzoj1069
    poj2079
    poj2187
    bzoj2281
    bzoj2285
    bzoj1558
    bzoj1822
    bzoj1559
    bzoj1570
  • 原文地址:https://www.cnblogs.com/xiaozhumaopao/p/14333599.html
Copyright © 2011-2022 走看看