I'm trying to set up ESLint in such a way that it parses a globals declaration file before linting the actual target file, so that I don't have to declare as globals all the functions and variables that are indeed globals, but letting the parser figure that out:
In some_module.js:
function do_something() {
if (glob_action("foobar")) {
... something something ...
}
}
While in globals.js I have a set of utilities and global variables:
function glob_action(x) {
... something something ...
}
So how can I tell to ESlint to include global.js in determining the fact that:
76:3 error 'glob_action' is not defined no-undef
is not actually undefined, but I do NOT want to list it as global:
/*global glob_action*/
I would like to do something like:
/*eslint include "../globa.js"*/
Is it possible? How?