Вы можете занести в белый список глобальные переменные в конфигурации eslint: https://eslint.org/docs/user-guide/configuring (см. «Определение глобальных переменных»).
To configure global variables inside of a configuration file, use the globals key and indicate the global variables you want to use. Set each global variable name equal to true to allow the variable to be overwritten or false to disallow overwriting. For example:
{
"globals": {
"var1": true,
"var2": false
}
}
Обычно у вас есть какой-то файл .eslintrc.js
, куда вы можете включить его.
Вот пример: https://github.com/pulseshift/openui5-gulp-starter-kit/blob/master/.eslintrc.js