首选项setting.json配置 // (工作区){ "editor.formatOnSave": true, // 保存时自动格式化 "editor.codeActionsOnSave": { "source.fixAll.eslint": true // 保存时自动修复 },}