版博士V2.0程序
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 

18 wiersze
547 B

  1. 'use strict';
  2. var utilContainsNewline = require('./util-contains-newline.js');
  3. function flowIndentCheck(indent, fc, onError) {
  4. if (fc?.type === 'flow-collection') {
  5. const end = fc.end[0];
  6. if (end.indent === indent &&
  7. (end.source === ']' || end.source === '}') &&
  8. utilContainsNewline.containsNewline(fc)) {
  9. const msg = 'Flow end indicator should be more indented than parent';
  10. onError(end, 'BAD_INDENT', msg, true);
  11. }
  12. }
  13. }
  14. exports.flowIndentCheck = flowIndentCheck;