vscode配置文件-vutur自动格式化-eslint校验-属性换行
【代码】vscode配置文件-vutur自动格式化-eslint校验-属性换行。
·
vscode配置文件-vutur自动格式化-eslint校验-属性换行
{
// eslint 配置
"eslint.enable": true,
"eslint.run": "onType",
"eslint.options": {
"extensions": [
".js",
".vue",
".jsx",
".tsx"
]
},
// 自动格式化代码设置
"editor.codeActionsOnSave": {
"source.fixAll": true,
// "source.fixAll.eslint": true,
// 保存时格式化
"editor.formatOnSave": true,
},
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
// "wrap_line_length": 250, // 换行字符串阈值
"tabWidth": 20, // tab缩进大小,默认为2
"semi": false, // 去掉末尾分号
// "htmlWhitespaceSensitivity": "strict", // html空格敏感度,可选值:'css'(样式表)|'strict'(严格)|'ignore'(忽略)
// "vueIndentScriptAndStyle": true, // vue文件中的script及style标签缩进
// "endOfLine": "auto", // 结尾是 \n \r \n\r auto
// auto 不进行格式化
// force 首个属性与开始标签共一行,最后的属性与开始标签结束的 > 符号共一行,其他属性单独一行。
// force-aligned 所有属性强制对齐,若组件名较长太不美观,不建议使用。
// force-expand-multiline 所有属性单独占据一行且对齐。开始标签和开始标签结束的 > 符号同样单独占据一行。
"wrap_attributes": "force-aligned", //属性换行
// "end_with_newline": false,
},
"prettyhtml": {
// "printWidth": 100,
"singleQuote": false, // //去掉末尾分号
// "wrapAttributes": false,
"sortAttributes": false
},
"prettier": {
// "semi": true, //去掉末尾分号
"trailingComma": true, // 这个就是设置是否末尾添加逗号的字段
"singleQuote": true //将所有双引号改为单引号
}
},
// #让vue中的js按"prettier"格式进行格式化
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatter.js": "prettier",
"path-autocomplete.extensionOnImport": true,
"path-autocomplete.pathMappings": {
"@": "${folder}/src"
},
"security.workspace.trust.untrustedFiles": "open",
"editor.fontSize": 15,
"liveServer.settings.donotShowInfoMsg": true,
"less.compile": {
"out": "../css/"
},
"editor.tabSize": 2,
"[javascript]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
},
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
},
"workbench.startupEditor": "none",
"explorer.confirmDelete": false,
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"cssrem.rootFontSize": 80,
"cssrem.vwDesign": 1920,
"[typescript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"liveServer.settings.port": 0,
"vetur.validation.interpolation": false,
"vetur.validation.script": false,
"git.confirmSync": false,
"git.enableSmartCommit": true,
"editor.inlineSuggest.enabled": true,
"eslint.trace.server": "off",
"eslint.alwaysShowStatus": true,
"github.copilot.enable": {
"*": true,
"yaml": false,
"plaintext": false,
"markdown": false
},
"git.openRepositoryInParentFolders": "always",
"terminal.integrated.enableMultiLinePasteWarning": false,
"eslint.nodeEnv": "",
"editor.semanticTokenColorCustomizations": {},
"editor.tokenColorCustomizations": {},
"editor.bracketPairColorization.independentColorPoolPerBracketType": true,
"editor.formatOnSave": true,
"window.openFoldersInNewWindow": "on",
"window.openFilesInNewWindow": "on",
"editor.formatOnPaste": true,
"backgroundCover.imagePath": "c:\\Users\\85839\\Pictures\\壁纸\\QQ截图20230412214624.png",
"backgroundCover.opacity": 0.3,
"backgroundCover.randomImageFolder": "c:\\Users\\85839\\Pictures\\壁纸",
"backgroundCover.autoStatus": true,
"workbench.colorTheme": "Default Dark+ Experimental",
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"javascript.updateImportsOnFileMove.enabled": "always",
"diffEditor.ignoreTrimWhitespace": false
}
效果
更多推荐
已为社区贡献1条内容
所有评论(0)