使用ESlint配置代码规范,使用Prettier完成符合Eslint的格式化。
创建.prettierrc文件放在根目录下,使vscode知道保存时如何对代码进行格式化,.eslintrc.js,用于配置eslint的验证规则
{ // 是否尾随分号 "semi": false, // 使用单引号 "singleQuote": true, // 多行逗号分割的语法中,最后一行不加逗号 "trailingComma": "none" }