nl_tokens: Check indentation for blocks
pl_tokens: function blockIndentationCheck ( node ) { // Skip inline blocks if ( isSingleLineNode ( node ) ) { return ; } if ( node . parent && ( node . <mask> . type === "FunctionExpression" || node . parent . type === "FunctionDeclaration" || node . parent . type === "ArrowFunctionExpression" ) ) { checkIndentInFunctionBlock ( node ) ; return ; } var indent ; var nodesToCheck = [ ] ; // For this statements we should check indent from statement begin // (not from block begin) var statementsWithProperties = [ "IfStatement" , "WhileStatement" , "ForStatement" , "ForInStatement" , "ForOfStatement" , "DoWhileStatement" ] ; if ( node . parent && statementsWithProperties . indexOf ( node . parent . type ) !== - 1 && isNodeBodyBlock ( node ) ) { indent = getNodeIndent ( node . parent ) ; } else { indent = getNodeIndent ( node ) ; } if ( node . type === "IfStatement" && node . consequent . type !== "BlockStatement" ) { nodesToCheck = [ node . consequent ] ; } else if ( util . isArray ( node . body ) ) { nodesToCheck = node . body ; } else { nodesToCheck = [ node . body ] ; } if ( nodesToCheck . length > 0 ) { checkNodesIndent ( nodesToCheck , indent + indentSize ) ; } if ( node . type === "BlockStatement" ) { checkLastNodeLineIndent ( node , indent ) ; } }