代码格式化快捷键:
Ctrl+Alt+Shift+L
prettier配置如图(没有prettier先到插件商店安装)
Eslint配置如图:
在文件中执行格式化快捷键,不报错,表示配置工程化成功!
脚手架自动整合了vue-router
自己整合
代码规范: Getting Started with ESLint - ESLint - Pluggable JavaScript Linter
代码美化: https://prettier.io/docs/en/install.html
直接整合
包括了https://github.com/prettier/eslint-config-prettier#installation