lib/config/config-validator.js
function validateGlobals(globalsConfig, source = null) {
    if (!globalsConfig) {
        return;
    }

    Object.entries(globalsConfig)
        .forEach(([configuredGlobal, configuredValue]) => {
            try {
                ConfigOps.normalizeConfigGlobal(configuredValue);
            } catch (err) {
                throw new Error(`ESLint configuration of global '${configuredGlobal}' in ${source} is invalid:\n${err.message}`);
            }
        });
}
function validateGlobals(globalsConfig, source = null) {
    if (!globalsConfig) {
        return;
    }

    Object.entries(globalsConfig)
        .forEach(([configuredGlobal, configuredValue]) => {
            try {
                ConfigOps.normalizeConfigGlobal(configuredValue);
            } catch (err) {
                throw new Error(`ESLint configuration of global '${configuredGlobal}' in ${source} is invalid:\n${err.message}`);
            }
        });
}
function validateGlobals ( globalsConfig , source = null ) { if ( ! globalsConfig ) { return ; } Object . entries ( globalsConfig ) . forEach ( ( [ configuredGlobal , configuredValue ] ) => { try { ConfigOps . normalizeConfigGlobal ( configuredValue ) ; } catch ( err ) { throw new Error ( ` ${ configuredGlobal } ${ source } \n ${ err . message } ` ) ; } } ) ; }
Validates a `globals` section of a config file
@param {Object} globalsConfig The `glboals` section
@param {string|null} source The name of the configuration source to report in the event of an error.
@returns {void}
Validates a globals section of a config file