How to configure formatted vue? for vscode

projects use eslint to standardize js code. You can install plug-ins in vscode , and directly configure "eslint.autoFixOnSave": true in usersetting.json . In this way, saving can automatically format js code
but here comes the problem: template and style < / code in .vue files.

Jun.30,2021

you can install a vetur plug-in and configure it like this in setting.json.

// vuehtml
"vetur.format.defaultFormatter.html": "js-beautify-html",

Menu