I set up eslint in the editor, https://eslint.org/docs/user-guide/configuring#specifying-globals :

In my config it looks like this:

"eslint.enable": true, "eslint.options": { "globals": { "$": true, "moment": true }, ... 

With these settings, VS Code gives an error:

 (options.globals || []).reduce is not a function 

How to configure eslint global config in VS Code?

    1 answer 1

    As it turned out, the solution is quite unexpected and found here https://github.com/eslint/eslint/pull/6922

    Those. it is proposed to replace the global settings object with an array, and now with this in mind, my config looks like this:

     "eslint.enable": true, "eslint.options": { "globals": [ "$", "moment" ], ... 

    I hope someone will answer will reduce the time to find a solution to the problem.