这是根据网上那种比较全的eslint格式修改的,因为我有的插件没用
这个在setting.json中进行配置,,就是vscode中的文件=》首选项=》设置
{
"eslint.codeAction.showDocumentation": {
"enable": true
},
// vscode默认启用了根据文件类型自动设置tabsize的选项
"editor.detectIndentation": false,
// 重新设定tabsize
"editor.tabSize": 2,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
// #让函数(名)和后面的括号之间加个空格
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
}