diff --git a/lib/rules/indentation/index.js b/lib/rules/indentation/index.js index 4e703bbf3a..c7fdb30fa4 100644 --- a/lib/rules/indentation/index.js +++ b/lib/rules/indentation/index.js @@ -628,7 +628,7 @@ function inferRootIndentLevel(root, baseIndentLevel, indentSize) { } const indents = []; - const foundIndents = /(?:^|\n)([ \t]*)\S[^\r\n]*(?:\r?\n\s*)*$/m.exec(root.raws.beforeStart); + const foundIndents = /(?:^|\n)([ \t]*)\S/m.exec(root.raws.beforeStart); // The indent level of the CSS code block in non-CSS-like files is determined by the shortest indent of non-empty line. if (foundIndents) {