code: function hasCommentBefore(node, sourceCode) {
    return sourceCode.getCommentsBefore(node)
      .some(comment => comment.loc.end.line >= node.loc.start.line - 1)
  }
docs: Checks whether `node` has a comment (that ends) on the previous line or on the same line as `node` (starts).