vscode vue eslint配置代码格式化
安装ESLint
配置settings.json
路径: File > Preferences > Settings > settings.json
添加:
"editor.tabSize": 2,
"eslint.alwaysShowStatus": true,
"eslint.packageManager": "yarn",
"eslint.validate": [
"javascript",
"js",
"vue",
],
"eslint.options": {
"extensions": [
".js",
".vue"
]
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.run": "onSave",
"files.autoSaveDelay": 3000,
"eslint.codeAction.disableRuleComment": {
},
"files.autoSave": "off",
问题1:Delete ␍
eslintprettier/prettier
参考:https://blog.csdn.net/weixin_42349568/article/details/115538848