在项目根目录创建文件.prettierrc { "semi": false, "singleQuote": true } 其中: “semi”: false 表示行尾不加封号“singleQuote”: true 表示使用单引号 修改.eslintrc.js文件,解决方法定义时括号空格问题