rules/indent.js
function addBlocklessNodeIndent(node) {
            if (node.type !== "BlockStatement") {
                const lastParentToken = sourceCode.getTokenBefore(node, astUtils.isNotOpeningParenToken);

                let firstBodyToken = sourceCode.getFirstToken(node);
                let lastBodyToken = sourceCode.getLastToken(node);

                while (
                    astUtils.isOpeningParenToken(sourceCode.getTokenBefore(firstBodyToken)) &&
                    astUtils.isClosingParenToken(sourceCode.getTokenAfter(lastBodyToken))
                ) {
                    firstBodyToken = sourceCode.getTokenBefore(firstBodyToken);
                    lastBodyToken = sourceCode.getTokenAfter(lastBodyToken);
                }

                offsets.setDesiredOffsets([firstBodyToken.range[0], lastBodyToken.range[1]], lastParentToken, 1);

                /*
                 * For blockless nodes with semicolon-first style, don't indent the semicolon.
                 * e.g.
                 * if (foo) bar()
                 * ; [1, 2, 3].map(foo)
                 */
                const lastToken = sourceCode.getLastToken(node);

                if (node.type !== "EmptyStatement" && astUtils.isSemicolonToken(lastToken)) {
                    offsets.setDesiredOffset(lastToken, lastParentToken, 0);
                }
            }
        }
function addBlocklessNodeIndent(node) {
            if (node.type !== "BlockStatement") {
                const lastParentToken = sourceCode.getTokenBefore(node, astUtils.isNotOpeningParenToken);

                let firstBodyToken = sourceCode.getFirstToken(node);
                let lastBodyToken = sourceCode.getLastToken(node);

                while (
                    astUtils.isOpeningParenToken(sourceCode.getTokenBefore(firstBodyToken)) &&
                    astUtils.isClosingParenToken(sourceCode.getTokenAfter(lastBodyToken))
                ) {
                    firstBodyToken = sourceCode.getTokenBefore(firstBodyToken);
                    lastBodyToken = sourceCode.getTokenAfter(lastBodyToken);
                }

                offsets.setDesiredOffsets([firstBodyToken.range[0], lastBodyToken.range[1]], lastParentToken, 1);

                /*
                 * For blockless nodes with semicolon-first style, don't indent the semicolon.
                 * e.g.
                 * if (foo) bar()
                 * ; [1, 2, 3].map(foo)
                 */
                const lastToken = sourceCode.getLastToken(node);

                if (node.type !== "EmptyStatement" && astUtils.isSemicolonToken(lastToken)) {
                    offsets.setDesiredOffset(lastToken, lastParentToken, 0);
                }
            }
        }
function addBlocklessNodeIndent ( node ) { if ( node . type !== "BlockStatement" ) { const lastParentToken = sourceCode . getTokenBefore ( node , astUtils . isNotOpeningParenToken ) ; let firstBodyToken = sourceCode . getFirstToken ( node ) ; let lastBodyToken = sourceCode . getLastToken ( node ) ; while ( astUtils . isOpeningParenToken ( sourceCode . getTokenBefore ( firstBodyToken ) ) && astUtils . isClosingParenToken ( sourceCode . getTokenAfter ( lastBodyToken ) ) ) { firstBodyToken = sourceCode . getTokenBefore ( firstBodyToken ) ; lastBodyToken = sourceCode . getTokenAfter ( lastBodyToken ) ; } offsets . setDesiredOffsets ( [ firstBodyToken . range [ 0 ] , lastBodyToken . range [ 1 ] ] , lastParentToken , 1 ) ; /*
                 * For blockless nodes with semicolon-first style, don't indent the semicolon.
                 * e.g.
                 * if (foo) bar()
                 * ; [1, 2, 3].map(foo)
                 */ const lastToken = sourceCode . getLastToken ( node ) ; if ( node . type !== "EmptyStatement" && astUtils . isSemicolonToken ( lastToken ) ) { offsets . setDesiredOffset ( lastToken , lastParentToken , 0 ) ; } } }
Check and decide whether to check for indentation for blockless nodes
Scenarios are for or while statements without braces around them
@param {ASTNode} node node to examine
@returns {void}
Check and decide whether to check for indentation for blockless nodes Scenarios are for or while statements without braces around them