nl_tokens: Ensure 1 extra indentation inside Block than before it
pl_tokens: function inspectBlockStatement ( emitted ) { let node = emitted . node ; //if the complete block resides on the same line, no need to check for indentation if ( emitted . exit || ( sourceCode . getLine ( node ) === sourceCode . getEndingLine ( node ) ) ) { return ; } let parent = sourceCode . getParent ( node ) , parentDeclarationLine = sourceCode . getLine ( parent ) , parentDeclarationLineText = sourceCode . getTextOnLine ( parentDeclarationLine ) , currentIndent , currentIndentLevel ; function inspectBlockItem ( blockIndent , blockIndentDesc , blockItem ) { let prevChars = sourceCode . getPrevChars ( blockItem , blockIndent . length + 1 ) , endingLineNum = sourceCode . getEndingLine ( blockItem ) , endingLineRegExp = new RegExp ( "^" + blockIndent + "(" + BASE_INDENTATION_STYLE + ")?\\S.*$" ) ; if ( prevChars !== ( "\n" + blockIndent ) ) { context . report ( { node : blockItem , <mask> : ` ${ blockIndentDesc } ` } ) ; } /**
  				 * If the block item spans over multiple lines, make sure the ending line also follows the indent rule
  				 * An exception to this is the if-else statements when they don't have BlockStatement as their body
  				 * eg-
  				 * if (a)
  				 *     foo();
  				 * else
  				 *     bar();
  				 *
  				 * Another exception is chaining.
  				 * eg-
  				 * function() {
  				 *   myObject
  				 *     .funcA()
  				 *     .funcB()
  				 *     [0];
  				 * }
  				 * Ending line has 1 extra indentation but this is acceptable.
  				 */ if ( blockItem . type !== "IfStatement" && sourceCode . getLine ( blockItem ) !== endingLineNum && ! endingLineRegExp . test ( sourceCode . getTextOnLine ( endingLineNum ) ) ) { context . report ( { node : blockItem , location : { line : endingLineNum , column : 0 } , message : ` ${ blockIndentDesc } ` } ) ; } } currentIndent = parentDeclarationLineText . slice ( 0 , parentDeclarationLineText . indexOf ( parentDeclarationLineText . trim ( ) ) ) ; //in case of no match, match() returns null. Return [] instead to avoid crash currentIndentLevel = ( currentIndent . match ( BASE_INDENTATION_STYLE_REGEXP_GLOBAL ) || [ ] ) . length ; //ensure that there is only whitespace of correct level before the block's parent's code if ( getIndentString ( BASE_INDENTATION_STYLE , currentIndentLevel ) !== currentIndent ) { return ; //exit now, we can' proceed further unless this is fixed } //indentation of items inside block should be 1 level greater than that of parent const blockIndent = getIndentString ( BASE_INDENTATION_STYLE , currentIndentLevel + 1 ) ; const blockIndentDesc = getIndentDescription ( BASE_INDENTATION_STYLE , currentIndentLevel + 1 ) ; node . body . forEach ( inspectBlockItem . bind ( null , blockIndent , blockIndentDesc ) ) ; }