vscode开发vue项目时 vuter "wrap_attributes": "force-aligned",配合prettier自动格式化
但vuter又一直警告html标签的自定义属性
怎么关掉这个警告呢
vscode配置
{
"workbench.colorTheme": "Panda Syntax",
"editor.renderWhitespace": "none",
"breadcrumbs.enabled": false,
"files.associations": {
"*.cjson": "jsonc",
"*.wxss": "css",
"*.wxs": "javascript"
},
"emmet.includeLanguages": {
"wxml": "html"
},
"explorer.confirmDragAndDrop": false,
"git.confirmSync": false,
"git.autofetch": true,
//"editor.fontFamily": "Monaco,'思源黑体','Courier New', monospace",
"editor.fontSize": 14,
"editor.lineHeight": 18,
//"workbench.colorTheme": "One Dark Pro",
// vscode默认启用了根据文件类型自动设置tabsize的选项
"editor.detectIndentation": false,
// 重新设定tabsize
"editor.tabSize": 2,
// #每次保存的时候自动格式化
"editor.formatOnSave": true,
// #每次保存的时候将代码按eslint格式进行修复
"eslint.autoFixOnSave": true,
// 添加 vue 支持
"eslint.validate": [
"javascript",
"javascriptreact",
{
"language": "vue",
"autoFix": true
},
{
"language": "typescript",
"autoFix": true
},
{
"language": "html",
"autoFix": true
}
],
// #让prettier使用eslint的代码格式进行校验
"prettier.eslintIntegration": true,
// #去掉代码结尾的分号
"prettier.semi": false,
// #使用单引号替代双引号
"prettier.singleQuote": true,
// #让函数(名)和后面的括号之间加个空格
"javascript.format.insertSpaceBeforeFunctionParenthesis": false,
// 定义匿名函数的函数关键字后面的空格处理。
"javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
// 定义匿名函数的函数关键字后面的空格处理。
"typescript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
// #这个按用户自身习惯选择
"vetur.format.defaultFormatter.html": "js-beautify-html",
// 关闭vue行间警告
"vetur.validation.template": false,
// #让vue中的js按编辑器自带的ts格式进行格式化
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatter.ts": "vscode-typescript",
"vetur.format.defaultFormatter.css": "prettier",
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
// Wrap attributes to new lines [auto|force|force-aligned|force-expand-multiline] ["auto"]
"wrap_attributes": "force-aligned",
"end_with_newline": false
// #vue组件中html代码格式化样式
}
},
// 格式化stylus, 需安装Manta's Stylus Supremacy插件
"stylusSupremacy.insertColons": false, // 是否插入冒号
"stylusSupremacy.insertSemicolons": false, // 是否插入分好
"stylusSupremacy.insertBraces": false, // 是否插入大括号
"stylusSupremacy.insertNewLineAroundImports": false, // import之后是否换行
"stylusSupremacy.insertNewLineAroundBlocks": false,
"explorer.confirmDelete": false,
"javascript.updateImportsOnFileMove.enabled": "always",
"diffEditor.ignoreTrimWhitespace": true,
"editor.wordWrapColumn": 120,
"editor.minimap.enabled": false,
"terminal.integrated.shell.windows": "E:\\xampp\\Git\\bin\\bash.exe",
"workbench.startupEditor": "newUntitledFile",
"window.zoomLevel": -1,
"workbench.iconTheme": "vscode-icons" // 两个选择器中是否换行
}
注释掉vscode eslint 缩进相关对于vue文件支持