我根据手册https://eslint.org/docs/user-guide/configuring#specifying-globals在编辑器中配置 eslint :
在我的配置中,它看起来像这样:
"eslint.enable": true,
"eslint.options": {
"globals": {
"$": true,
"moment": true
},
...
使用这些设置,VS Code 会抛出错误:
(options.globals || []).reduce is not a function
如何在 VS Code 中设置全局 eslint 配置?