Halfway done

This commit is contained in:
2024-10-19 22:45:27 +01:00
parent 47f56cd473
commit f2e9d5844b
10632 changed files with 1720635 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import { containsNewline } from './util-contains-newline.js';
function flowIndentCheck(indent, fc, onError) {
if (fc?.type === 'flow-collection') {
const end = fc.end[0];
if (end.indent === indent &&
(end.source === ']' || end.source === '}') &&
containsNewline(fc)) {
const msg = 'Flow end indicator should be more indented than parent';
onError(end, 'BAD_INDENT', msg, true);
}
}
}
export { flowIndentCheck };