VSCode 编辑器设置
插件推荐[PS: 其他需要可以自己安装]
- Auto Close Tag
- Auto Rename Tag
- Beautify css/sass/scss/less
- ESLint
- open in browser
- Path intellisense
- SVG Viewer
- Vetur
- vscode-icons
- Javascript (ES6) code snippets
- Vue 2 Snippets
- Chinese (Simplified) Language Pack for Visual Studio Code
编辑器配置
- 打开文件/code
- 选择首选项
- 选择设置
- 在User Settings 中加入以下代码
"eslint.autoFixOnSave": true,
"eslint.validate": [
"javascript",
"javascriptreact",
{
"language": "html",
"autoFix": true
},
{
"language": "vue",
"autoFix": true
}
]
具体规则可参考ESLint官方网站