在settings.json 中配置如下内容:
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true
}
这段代码添加后 会有删除无效代码的行为,如影响开发可以将其全部改为 false。
目前发现问题:
- 函数中 return 后面的代码会被自动删除
vscode 配置: 原文地址
在settings.json 中配置如下内容:
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true
}
这段代码添加后 会有删除无效代码的行为,如影响开发可以将其全部改为 false。
目前发现问题:
vscode 配置: 原文地址