src/cli/util.js/getOptionsOrDie
function getOptionsOrDie(context, filePath) {
  try {
    if (context.argv["config"] === false) {
      context.logger.debug(
        "'--no-config' option found, skip loading config file."
      );
      return null;
    }

    context.logger.debug(
      context.argv["config"]
        ? `load config file from '${context.argv["config"]}'`
        : `resolve config from '${filePath}'`
    );

    const options = resolver.resolveConfig.sync(filePath, {
      editorconfig: context.argv["editorconfig"],
      config: context.argv["config"]
    });

    context.logger.debug("loaded options `" + JSON.stringify(options) + "`");
    return options;
  } catch (error) {
    context.logger.error("Invalid configuration file: " + error.message);
    process.exit(2);
  }
}