@lousy-agents/lint 5.14.3 → 5.14.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +44 -30
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -37930,8 +37930,10 @@ class Composer {
|
|
|
37930
37930
|
}
|
|
37931
37931
|
}
|
|
37932
37932
|
if (afterDoc) {
|
|
37933
|
-
|
|
37934
|
-
|
|
37933
|
+
for (let i = 0; i < this.errors.length; ++i)
|
|
37934
|
+
doc.errors.push(this.errors[i]);
|
|
37935
|
+
for (let i = 0; i < this.warnings.length; ++i)
|
|
37936
|
+
doc.warnings.push(this.warnings[i]);
|
|
37935
37937
|
}
|
|
37936
37938
|
else {
|
|
37937
37939
|
doc.errors = this.errors;
|
|
@@ -41746,7 +41748,7 @@ class Lexer {
|
|
|
41746
41748
|
const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));
|
|
41747
41749
|
this.indentNext = this.indentValue + 1;
|
|
41748
41750
|
this.indentValue += n;
|
|
41749
|
-
return
|
|
41751
|
+
return 'block-start';
|
|
41750
41752
|
}
|
|
41751
41753
|
return 'doc';
|
|
41752
41754
|
}
|
|
@@ -42067,32 +42069,36 @@ class Lexer {
|
|
|
42067
42069
|
return 0;
|
|
42068
42070
|
}
|
|
42069
42071
|
*pushIndicators() {
|
|
42070
|
-
|
|
42071
|
-
|
|
42072
|
-
|
|
42073
|
-
|
|
42074
|
-
|
|
42075
|
-
|
|
42076
|
-
|
|
42077
|
-
|
|
42078
|
-
|
|
42079
|
-
|
|
42080
|
-
|
|
42081
|
-
|
|
42082
|
-
|
|
42083
|
-
|
|
42084
|
-
|
|
42085
|
-
|
|
42086
|
-
|
|
42087
|
-
|
|
42088
|
-
|
|
42089
|
-
|
|
42090
|
-
|
|
42091
|
-
|
|
42072
|
+
let n = 0;
|
|
42073
|
+
loop: while (true) {
|
|
42074
|
+
switch (this.charAt(0)) {
|
|
42075
|
+
case '!':
|
|
42076
|
+
n += yield* this.pushTag();
|
|
42077
|
+
n += yield* this.pushSpaces(true);
|
|
42078
|
+
continue loop;
|
|
42079
|
+
case '&':
|
|
42080
|
+
n += yield* this.pushUntil(isNotAnchorChar);
|
|
42081
|
+
n += yield* this.pushSpaces(true);
|
|
42082
|
+
continue loop;
|
|
42083
|
+
case '-': // this is an error
|
|
42084
|
+
case '?': // this is an error outside flow collections
|
|
42085
|
+
case ':': {
|
|
42086
|
+
const inFlow = this.flowLevel > 0;
|
|
42087
|
+
const ch1 = this.charAt(1);
|
|
42088
|
+
if (isEmpty(ch1) || (inFlow && flowIndicatorChars.has(ch1))) {
|
|
42089
|
+
if (!inFlow)
|
|
42090
|
+
this.indentNext = this.indentValue + 1;
|
|
42091
|
+
else if (this.flowKey)
|
|
42092
|
+
this.flowKey = false;
|
|
42093
|
+
n += yield* this.pushCount(1);
|
|
42094
|
+
n += yield* this.pushSpaces(true);
|
|
42095
|
+
continue loop;
|
|
42096
|
+
}
|
|
42092
42097
|
}
|
|
42093
42098
|
}
|
|
42099
|
+
break loop;
|
|
42094
42100
|
}
|
|
42095
|
-
return
|
|
42101
|
+
return n;
|
|
42096
42102
|
}
|
|
42097
42103
|
*pushTag() {
|
|
42098
42104
|
if (this.charAt(1) === '<') {
|
|
@@ -42272,6 +42278,14 @@ function getFirstKeyStartProps(prev) {
|
|
|
42272
42278
|
}
|
|
42273
42279
|
return prev.splice(i, prev.length);
|
|
42274
42280
|
}
|
|
42281
|
+
function arrayPushArray(target, source) {
|
|
42282
|
+
// May exhaust call stack with large `source` array
|
|
42283
|
+
if (source.length < 1e5)
|
|
42284
|
+
Array.prototype.push.apply(target, source);
|
|
42285
|
+
else
|
|
42286
|
+
for (let i = 0; i < source.length; ++i)
|
|
42287
|
+
target.push(source[i]);
|
|
42288
|
+
}
|
|
42275
42289
|
function fixFlowSeqItems(fc) {
|
|
42276
42290
|
if (fc.start.type === 'flow-seq-start') {
|
|
42277
42291
|
for (const it of fc.items) {
|
|
@@ -42284,12 +42298,12 @@ function fixFlowSeqItems(fc) {
|
|
|
42284
42298
|
delete it.key;
|
|
42285
42299
|
if (isFlowToken(it.value)) {
|
|
42286
42300
|
if (it.value.end)
|
|
42287
|
-
|
|
42301
|
+
arrayPushArray(it.value.end, it.sep);
|
|
42288
42302
|
else
|
|
42289
42303
|
it.value.end = it.sep;
|
|
42290
42304
|
}
|
|
42291
42305
|
else
|
|
42292
|
-
|
|
42306
|
+
arrayPushArray(it.start, it.sep);
|
|
42293
42307
|
delete it.sep;
|
|
42294
42308
|
}
|
|
42295
42309
|
}
|
|
@@ -42709,7 +42723,7 @@ class Parser {
|
|
|
42709
42723
|
const prev = map.items[map.items.length - 2];
|
|
42710
42724
|
const end = prev?.value?.end;
|
|
42711
42725
|
if (Array.isArray(end)) {
|
|
42712
|
-
|
|
42726
|
+
arrayPushArray(end, it.start);
|
|
42713
42727
|
end.push(this.sourceToken);
|
|
42714
42728
|
map.items.pop();
|
|
42715
42729
|
return;
|
|
@@ -42924,7 +42938,7 @@ class Parser {
|
|
|
42924
42938
|
const prev = seq.items[seq.items.length - 2];
|
|
42925
42939
|
const end = prev?.value?.end;
|
|
42926
42940
|
if (Array.isArray(end)) {
|
|
42927
|
-
|
|
42941
|
+
arrayPushArray(end, it.start);
|
|
42928
42942
|
end.push(this.sourceToken);
|
|
42929
42943
|
seq.items.pop();
|
|
42930
42944
|
return;
|
package/package.json
CHANGED