code: function canRemoveSemicolon(node) {
              if (isRedundantSemi(sourceCode.getLastToken(node))) {
                  return true; // `;;` or `;}`
              }
              if (isOnSameLineWithNextToken(node)) {
                  return false; // One liner.
              }
              if (beforeStatementContinuationChars === "never" && !maybeAsiHazardAfter(node)) {
                  return true; // ASI works. This statement doesn't connect to the next.
              }
              if (!maybeAsiHazardBefore(sourceCode.getTokenAfter(node))) {
                  return true; // ASI works. The next token doesn't connect to this statement.
              }
  
              return false;
          }
docs: Check if the semicolon of a given node is unnecessary, only true if:
  - next token is a valid statement divider (`;` or `}`).
  - next token is on a new line and the node is not connectable to the new line.
  @param {Node} node A statement node to check.
  @returns {boolean} whether the semicolon is unnecessary.