function parseKeybindingsFileData(data) {
  return new Promise((resolve, reject) => {
    if (!data || !_.isArray(data)) return reject(new Error('keybindings - list() - error parsing keybindings file data'));

    //TODO: should we group these by context name to avoid duplicates??

    var commands = [];

    _.each(data, context => {
      if (context.commands) {
        for (let key in context.commands) {
          commands.push({
            keystroke: key,
            command: context.commands[key],
            context: context.context
          });
        }
      }
    });

    return resolve(commands);
  });
}
@function parseKeybindingsFileData
@private

@param {Object} data - raw contexts from keybindings file