项目根目录添加.prettierrc文件 { “semi”: false, //不使用分号 “singleQuote”: true //使用单引号 } 或者直接在.eslintrc.js代码检测配置 具体参考:添加链接描述