lib/rules/no-irregular-whitespace.js
function checkForIrregularWhitespace(node) {
            const sourceLines = sourceCode.lines;

            sourceLines.forEach((sourceLine, lineIndex) => {
                const lineNumber = lineIndex + 1;
                let match;

                while ((match = IRREGULAR_WHITESPACE.exec(sourceLine)) !== null) {
                    const location = {
                        line: lineNumber,
                        column: match.index
                    };

                    errors.push({ node, message: "Irregular whitespace not allowed.", loc: location });
                }
            });
        }
function checkForIrregularWhitespace(node) {
            const sourceLines = sourceCode.lines;

            sourceLines.forEach((sourceLine, lineIndex) => {
                const lineNumber = lineIndex + 1;
                let match;

                while ((match = IRREGULAR_WHITESPACE.exec(sourceLine)) !== null) {
                    const location = {
                        line: lineNumber,
                        column: match.index
                    };

                    errors.push({ node, message: "Irregular whitespace not allowed.", loc: location });
                }
            });
        }
function checkForIrregularWhitespace ( node ) { const sourceLines = sourceCode . lines ; sourceLines . forEach ( ( sourceLine , lineIndex ) => { const lineNumber = lineIndex + 1 ; let match ; while ( ( match = IRREGULAR_WHITESPACE . exec ( sourceLine ) ) !== null ) { const location = { line : lineNumber , column : match . index } ; errors . push ( { node , message : "Irregular whitespace not allowed." , loc : location } ) ; } } ) ; }
Checks the program source for irregular whitespace
@param {ASTNode} node The program node
@returns {void}
@private
Checks the program source for irregular whitespace