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":[
]
}