eslint插件对于代码的格式化要求很高
vscode建议配置的
vscode建议配置
{
“workbench.startupEditor”: “newUntitledFile”,
“window.zoomLevel”: 0,
“explorer.confirmDragAndDrop”: false,
// 控制是否显示 minimap
“editor.minimap.enabled”: false,
“git.confirmSync”: false,
“git.enableSmartCommit”: true,
“gitlens.advanced.messages”: {
“suppressShowKeyBindingsNotice”: true
},
“gitlens.gitExplorer.files.layout”: “tree”,
“gitlens.advanced.fileHistoryFollowsRenames”: true,
“extensions.ignoreRecommendations”: true,
“emmet.syntaxProfiles”: {
“vue-html”: “html”,
“vue”: “html”
},
“vetur.validation.template”: false,
“workbench.iconTheme”: “vscode-icons”,
“editor.tabSize”: 2,
“prettier.jsxSingleQuote”: true,
“prettier.singleQuote”: true,
“prettier.semi”: false,
“prettier.printWidth”: 200,
“javascript.updateImportsOnFileMove.enabled”: “always”,
“vetur.format.defaultFormatter.html”: “js-beautify-html”,
“editor.formatOnSave”: false,
//eslint
“eslint.autoFixOnSave”: true,
“eslint.options”: {
“extensions”: [".js", “.vue”]
},
“eslint.validate”: [
“javascript”,
{
“language”: “vue”,
“autoFix”: true
},
“html”,
“vue”
],
“vetur.format.defaultFormatter.js”: “vscode-typescript”,
“vetur.format.defaultFormatterOptions”: {
“js-beautify-html”: {
“wrap_attributes”: “auto”
},
“prettyhtml”: {
“printWidth”: 200,
“singleQuote”: false,
“wrapAttributes”: false,
“sortAttributes”: false
}
}
}
VScode编译器的常规插件
最新推荐文章于 2024-08-10 13:59:24 发布