vue代码格式化思路

{
"pasteImage.path": "${currentFileNameWithoutExt}_Images/",
"update.mode": "manual",
"extensions.autoUpdate": false,
"extensions.autoCheckUpdates": false,
"editor.formatOnSave": true, // 这个保存时候进行格式化
"editor.codeActionsOnSave": {
// 保存时候 eslint修复
"source.fixAll.eslint": true
},
"editor.fontSize": 22,
"editor.fontFamily": "Consolas, 'Courier New', monospace",
"editor.fontLigatures": false,
"editor.fontWeight": "400",
"editor.lineHeight": 28,
"editor.letterSpacing": 0,
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": true,
"editor.wordWrap": "off",
"editor.renderLineHighlight": "gutter",
"editor.roundedSelection": true,
"editor.renderControlCharacters": true,
"editor.renderIndentGuides": true,
"editor.dragAndDrop": false,
"editor.minimap.enabled": false,
"editor.minimap.showSlider": "mouseover",
"editor.minimap.renderCharacters": true,
"editor.minimap.maxColumn": 200,
"editor.quickSuggestions": {
"strings": true
},
"editor.suggestSelection": "first",
"window.titleBarStyle": "native",
"window.menuBarVisibility": "visible",
"window.title": "${rootName} - ${dirty}${activeEditorLong}",
"workbench.colorTheme": "Spacegray Eighties Dark",
"workbench.iconTheme": "material-icon-theme",
"workbench.startupEditor": "welcomePage",
"workbench.activityBar.visible": true,
"workbench.editor.enablePreview": true,
"workbench.editor.tabSizing": "fit",
"workbench.editor.wrapTabs": false,
"workbench.editor.decorations.colors": true,
"workbench.editor.decorations.badges": true,
"workbench.tree.renderIndentGuides": "none",
"workbench.colorCustomizations": {
// "statusBar.background": "#333333",
// "statusBar.foreground": "#adadad",
"terminal.background": "#000000",
"terminal.foreground": "#FFFFFF"
},
"breadcrumbs.enabled": true,
"breadcrumbs.symbolPath": "off",
"explorer.openEditors.visible": 0,
"explorer.compactFolders": false,
"files.encoding": "utf8",
"files.eol": "\r\n",
"files.hotExit": "onExit",
"files.autoSave": "off",
"emmet.includeLanguages": {
"javascript": "javascriptreact"
},
//javascript
// "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"js/ts.implicitProjectConfig.experimentalDecorators": true,
//git
"git.path": "D:\\Git\\bin\\git.exe",
"git.enableSmartCommit": false,
//terminal
//"terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\cmd.exe",
//"terminal.integrated.shell.windows": "D:\\Git\\git-bash.exe",
"terminal.explorerKind": "integrated",
//eslint
"eslint.format.enable": true,
"eslint.validate": [
"javascript",
"javascriptreact",
"vue",
"typescript",
"typescriptreact"
],
//bookmarks
// "bookmarks.saveBookmarksInProject": true,
"[vue]": {
"editor.defaultFormatter": "hikerpig.vetur"
},
"javascript.format.insertSpaceBeforeFunctionParenthesis": true, // 让函数名和后面的括号之间加个空格
"javascript.format.insertSpaceAfterCommaDelimiter": true, // 逗号后面有空格
"javascript.format.insertSpaceBeforeAndAfterBinaryOperators": true, // 运算符前后有空格
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true, // 大括号前面插空格
"javascript.format.insertSpaceAfterKeywordsInControlFlowStatements": true, // 关键字后面加空格
"javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": true, // 匿名函数后面加空格
"vetur.format.options.tabSize": 2, // 每个缩进级别的空格数,由所有格式化程序继承
"vetur.format.scriptInitialIndent": false, // js部分是否有初始缩进
//vetur
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
// - auto: 仅在超出行长度时才对属性进行换行
// - force: 对除第一个属性外的其他每个属性进行换行
// - force-aligned: 对除第一个属性外的其他每个属性进行换行,并保持对齐
// - force-expand-multiline: 对每个属性进行换行
// - aligned-multiple: 当超出折行长度时,将属性进行垂直对齐
"wrap_attributes": "force-aligned", // 属性折行对齐方式
"wrap_line_length": 120, // 设置一行多少字符换行
"semi": false, // 是否在每行末尾添加分号
"singleQuote": true, // 使用单引号
"end_with_newline": false
}
},
// "vetur.format.defaultFormatterOptions": {
// "js-beautify-html": {
// "wrap_attributes": "force-aligned"
// }
// },
"vetur.validation.template": false,
//liveServer
"liveServer.settings.donotVerifyTags": true,
//alias-skip
"alias-skip.mappings": {
"@": "/src",
"_c": "/src/components"
},
// "[vue]": {
// "editor.defaultFormatter": "esbenp.prettier-vscode"
// },
"[markdown]": {
"editor.minimap.enabled": true,
"editor.wordWrap": "on",
"editor.quickSuggestions": false,
"editor.formatOnSave": false
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"scf.python3.path": "",
"scf.python2.path": "",
"tabnine.experimentalAutoImports": true,
"javascript.format.enable": false,
"javascript.format.insertSpaceAfterConstructor": false,
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
"javascript.format.insertSpaceAfterSemicolonInForStatements": false,
"javascript.format.placeOpenBraceOnNewLineForControlBlocks": false,
"javascript.format.placeOpenBraceOnNewLineForFunctions": false,
"liveServer.settings.donotShowInfoMsg": true,
"[typescriptreact]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"vue-helper.alias": {
"@": "src/"
},
"commentTranslate.source": "Baidu",
"commentTranslate.targetLanguage": "zh-CN",
"easy-translator.dictionary": ["YouDao", "Bing", "Google", "Linguee"]
// "[vue]": {
// "editor.defaultFormatter": "esbenp.prettier-vscode"
// }
}
// {
// // #让prettier使用eslint的代码格式进行校验 // "prettier.eslintIntegration": true,
// "editor.fontSize": 20,
// "workbench.iconTheme": "material-icon-theme",
// "workbench.colorTheme": "Spacegray Eighties Dark",
// // "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
// // "git.enableSmartCommit": true,
// // "git.autofetch": true,
// // "git.confirmSync": false,
// // "[javascript]": {
// // "editor.defaultFormatter": "HookyQR.beautify"
// // },
// // "php.validate.executablePath": "C:\\wamp\\bin\\php\\php5.6.25\\php.exe",
// // "phpserver.browser": "google-chrome",
// // "editor.fontLigatures": null,
// "editor.formatOnSave": true,
// "editor.codeActionsOnSave": {
// "source.fixAll.eslint": true
// },
// "editor.tabSize": 2,
// "editor.insertSpaces": true,
// //javascript
// "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
// // "javascript.implicitProjectConfig.experimentalDecorators": true,
// //eslint
// "eslint.format.enable": false,
// "eslint.validate": ["javascript", "javascriptreact", "vue"],
// //vetur
// "vetur.format.defaultFormatter.js": "vscode-typescript",
// "vetur.format.defaultFormatter.html": "js-beautify-html",
// "vetur.format.defaultFormatterOptions": {
// "js-beautify-html": {
// "wrap_attributes": "force-aligned"
// }
// },
// "vetur.validation.template": false,
// //vetur
// // "vetur.format.defaultFormatter.js": "vscode-typescript",
// // // "vetur.format.defaultFormatter.html": "js-beautify-html",
// // "vetur.format.defaultFormatterOptions": {
// // "js-beautify-html": {
// // "wrap_attributes": "force-aligned"
// // }
// // },
// // "vetur.validation.template": false,
// "terminal.integrated.shell.windows": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
// "git.confirmSync": false,
// "git.enableSmartCommit": true,
// "editor.suggestSelection": "first",
// "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
// "workbench.editorAssociations": {
// "*.ipynb": "jupyter.notebook.ipynb"
// },
// "[html]": {
// "editor.defaultFormatter": "HookyQR.beautify"
// },
// "[javascript]": {
// "editor.defaultFormatter": "vscode.typescript-language-features"
// },
// "[jsonc]": {
// "editor.defaultFormatter": "esbenp.prettier-vscode"
// },
// "[vue]": {
// "editor.defaultFormatter": "esbenp.prettier-vscode"
// }
// }

setting.json 20210825 更新的更多相关文章

  1. vscode setting.json

    setting.json { "sync.gist": "#github的码##", "sync.lastUpload": "20 ...

  2. vscode 自动修复 setting.json 修改完,得重启浏览器 # 新版(>1.41.0)配置 vscode #解决了

    vscode 自动修复 setting.json 修改完,得重启浏览器,不用 npm run dev 就能看到效果 "editor.codeActionsOnSave": { &q ...

  3. Json序列化更新好友列表

    一.概述 使用Newtonsoft.Json开源库进行序列化 二.代码 using Newtonsoft.Json; using System; using System.Collections.Ge ...

  4. vscode setting.json (@vue/eslint-config-prettier)

    {     "workbench.colorTheme": "Default Light+", // 主题     "terminal.integra ...

  5. 同步vscode的setting.json和extensions

    vc 详情 $ npm i -g vscode-config $ vc config --token <your github token> $ vc config --id <yo ...

  6. VS2013新建MVC5项目,使用nuget更新项目引用后发生Newtonsoft.Json引用冲突的解决办法

    错误信息如下: 错误    3    类型“Newtonsoft.Json.JsonPropertyAttribute”同时存在于“c:\Program Files (x86)\Microsoft V ...

  7. 通过反射实现Json数据部分更新JavaBean的属性

    工作中遇到一个需求,根据对方返回Json来更新Java对象.查阅资料,写了个工具类,同时学到了反射获取集合泛型类型.代码里json类库为fastjson public class JsonUtil { ...

  8. VS Code 调教日记(2022.6.26更新)

    VS Code 调教日记(2022.6.26更新) 基于msys2的MinGW-w64 GCC的环境配置 下载并安装msys2 到路径...msys2安装路径...\msys64\etc\pacman ...

  9. refactorObjProps:裁剪、添加对象字段或更新字段内容

    介绍 根据模板,自动对一个 JS 对象的字段进行裁剪.添加或更新字段类型. 比如,做一个设置功能,其设置的数据(对象)存储在 localStorage 中.如果对象的字段名称更新了.或增加了一个新的字 ...

  10. Google中Gson的使用解析json数据-------学习篇

    之前写过一篇Gson解析json数据的基本应用,这里不多说,直接上例子. 有兴趣的可以先阅读下之前那篇,这里附上链接: http://www.cnblogs.com/Ant-soldier/p/632 ...

随机推荐

  1. 使用Miniconda安装R语言环境

    使用Miniconda安装R语言 下载Miniconda3-latest-Linux-x86_64.sh 静默安装 sh Miniconda3-latest-Linux-x86_64.sh -b -p ...

  2. 【算法】【C语言进阶】C语言字符串操作宝藏级别汇总 strtok函数 strstr函数该怎么用?【超详细的使用解释和模拟实现】

    [算法][C语言进阶]C语言字符串操作宝藏级别汇总[超详细的使用解释和模拟实现] 作者: @小小Programmer 这是我的主页:@小小Programmer 在食用这篇博客之前,博主在这里介绍一下其 ...

  3. 文心一言 VS 讯飞星火 VS chatgpt (194)-- 算法导论14.3 2题

    二.用go语言,改写 INTERVAL-SEARCH 的代码,使得当所有区间都是开区间时,它也能正确地工作. 文心一言,代码正常运行: 在Go语言中,处理开区间(open intervals)时,我们 ...

  4. 将实体光盘制作成光盘映像iso文件

    春节假期整理历史物件时发现一些书籍的光盘,虽然买了多年但一直没有看过,因为自己在用的电脑都没有光驱.正好老爸的电脑是带光驱的,想着趁过节把这些光盘的内容读取出来存在NAS上方便后续使用. 使用Ultr ...

  5. .NET Core开发实战(第34课:MediatR:轻松实现命令查询职责分离模式(CQRS))--学习笔记(下)

    34 | MediatR:轻松实现命令查询职责分离模式(CQRS) 实际上我们在定义我的查询的时候,也可以这样定义,例如我们定义一个 MyOrderQuery,把订单的所有名称都输出出去 namesp ...

  6. CF1902

    A 只要不是全 \(1\) 即可. B 二分完成天数. C \(x\) 取差的 \(gcd\),\(a_{n+1}\) 见缝插针. D 用一个 map 记录按原始操作序列,要走到 \((x,y)\) ...

  7. 好书推荐之《JAVA编程思想》

    名人推荐 真是一本透着编程思想的书. 上面的书让你从微观角度了解 Java,而这本书则可以让你从一个宏观角度了解 Java. 这本书和 Java 核心技术的厚度差不多,但这本书的信息密度比较大. 所以 ...

  8. APB_AHB_AXI协议的简单介绍

    一.AMBA概述 今天要介绍的三种嵌入式总线技术:APB.AHB.AXI,它们都属于AMBA 片上总线协议.所以,在介绍这几种总线技术之前,有必要先了解一下AMBA 片上总线协议是什么. AMBA ( ...

  9. javascript 对http的get请求参数编码encodeURIComponent、encodeURI 和Java 解码

    JavaScript 代码encode functionfindNE(){ var nd = document.getElementById("NE").value; nd = e ...

  10. Innodb 存储引擎表

    目录 索引组织表 Innodb逻辑存储结构 表空间 段 区 页 行 Innodb 行记录格式 Compact Redundant 行溢出数据 Compressed 和 Dynamic 行记录格式 ch ...