function canRemoveSemicolon(node) {
			if (isRedundantSemi(sourceCode.getLastToken(node))) {
				return true; // `;;` or `;}`
			}
			if (maybeClassFieldAsiHazard(node)) {
				return false;
			}
			if (isOnSameLineWithNextToken(node)) {
				return false; // One liner.
			}

			// continuation characters should not apply to class fields
			if (
				node.type !== "PropertyDefinition" &&
				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;
		}
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.