function getFirstNodeInLine(context, node) {
  const sourceCode = getSourceCode(context);
  let token = node;
  let lines;
  do {
    token = sourceCode.getTokenBefore(token);
    lines = token.type === 'JSXText'
      ? token.value.split('\n')
      : null;
  } while (
    token.type === 'JSXText'
        && /^\s*$/.test(lines[lines.length - 1])
  );
  return token;
}
Gets the first node in a line from the initial node, excluding whitespace.
@param {Object} context The node to check
@param {ASTNode} node The node to check
@return {ASTNode} the first node in the line