rules/indent.js
function validateTokenIndent(token, desiredIndentLevel) {
            const indentation = tokenInfo.getTokenIndent(token);
            const expectedChar = indentType === "space" ? " " : "\t";

            return indentation === expectedChar.repeat(desiredIndentLevel * indentSize) ||

                // To avoid conflicts with no-mixed-spaces-and-tabs, don't report mixed spaces and tabs.
                indentation.includes(" ") && indentation.includes("\t");
        }
function validateTokenIndent(token, desiredIndentLevel) {
            const indentation = tokenInfo.getTokenIndent(token);
            const expectedChar = indentType === "space" ? " " : "\t";

            return indentation === expectedChar.repeat(desiredIndentLevel * indentSize) ||

                // To avoid conflicts with no-mixed-spaces-and-tabs, don't report mixed spaces and tabs.
                indentation.includes(" ") && indentation.includes("\t");
        }
function validateTokenIndent ( token , desiredIndentLevel ) { const indentation = tokenInfo . getTokenIndent ( token ) ; const expectedChar = indentType === "space" ? " " : "\t" ; return indentation === expectedChar . repeat ( desiredIndentLevel * indentSize ) || // To avoid conflicts with no-mixed-spaces-and-tabs, don't report mixed spaces and tabs. indentation . includes ( " " ) && indentation . includes ( "\t" ) ; }
Checks if a token's indentation is correct
@param {Token} token Token to examine
@param {int} desiredIndentLevel needed indent level
@returns {boolean} `true` if the token's indentation is correct
Checks if a token s indentation is correct