lib/rules/semi.js
function isRedundantSemi(semiToken) {
            const nextToken = sourceCode.getTokenAfter(semiToken);

            return (
                !nextToken ||
                astUtils.isClosingBraceToken(nextToken) ||
                astUtils.isSemicolonToken(nextToken)
            );
        }
function isRedundantSemi(semiToken) {
            const nextToken = sourceCode.getTokenAfter(semiToken);

            return (
                !nextToken ||
                astUtils.isClosingBraceToken(nextToken) ||
                astUtils.isSemicolonToken(nextToken)
            );
        }
function isRedundantSemi ( semiToken ) { const nextToken = sourceCode . getTokenAfter ( semiToken ) ; return ( ! nextToken || astUtils . isClosingBraceToken ( nextToken ) || astUtils . isSemicolonToken ( nextToken ) ) ; }
Check whether a given semicolon token is redandant.
@param {Token} semiToken A semicolon token to check.
@returns {boolean} `true` if the next token is `;` or `}`.
Check whether a given semicolon token is redandant .