在项目有关的eslint配置文件中加上以下内容即可 "rulse":{ "quotes": ["error", "single", { "allowTemplateLiterals": true }] } 相关链接:quotes - ESLint - Pluggable JavaScript Linter