function readConfigContent (configPath) {
    const parsedPath = path.parse(configPath)
    const isRcFile = parsedPath.ext !== '.js' && parsedPath.ext !== '.json';
    const jsonString = readConfigFileContent(configPath);
    const parse = isRcFile ?
      (contents) => JSON.parse(stripJSONComments(contents)) :
      (contents) => JSON.parse(contents);

    try {
        const parsed = parse(jsonString);

        Object.defineProperty(parsed, 'configPath', {
          value: configPath
        });

        return parsed;
    } catch (error) {
        error.message = [
          `Parsing JSON at ${configPath} for commitizen config failed:`,
          error.mesasge
        ].join('\n');

        throw error;
    }
}
Read the content of a configuration file
- if not js or json: strip any comments
- if js or json: require it
@param {String} configPath - full path to configuration file
@return {Object}