@isentinel/eslint-config 1.2.0 → 1.2.3
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.
|
@@ -0,0 +1,1760 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__commonJS,
|
|
3
|
+
__export,
|
|
4
|
+
__toESM,
|
|
5
|
+
init_esm_shims
|
|
6
|
+
} from "./chunk-YSIDNL3J.js";
|
|
7
|
+
|
|
8
|
+
// node_modules/.pnpm/fast-diff@1.3.0/node_modules/fast-diff/diff.js
|
|
9
|
+
var require_diff = __commonJS({
|
|
10
|
+
"node_modules/.pnpm/fast-diff@1.3.0/node_modules/fast-diff/diff.js"(exports, module) {
|
|
11
|
+
"use strict";
|
|
12
|
+
init_esm_shims();
|
|
13
|
+
var DIFF_DELETE = -1;
|
|
14
|
+
var DIFF_INSERT = 1;
|
|
15
|
+
var DIFF_EQUAL = 0;
|
|
16
|
+
function diff_main(text1, text2, cursor_pos, cleanup, _fix_unicode) {
|
|
17
|
+
if (text1 === text2) {
|
|
18
|
+
if (text1) {
|
|
19
|
+
return [[DIFF_EQUAL, text1]];
|
|
20
|
+
}
|
|
21
|
+
return [];
|
|
22
|
+
}
|
|
23
|
+
if (cursor_pos != null) {
|
|
24
|
+
var editdiff = find_cursor_edit_diff(text1, text2, cursor_pos);
|
|
25
|
+
if (editdiff) {
|
|
26
|
+
return editdiff;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
var commonlength = diff_commonPrefix(text1, text2);
|
|
30
|
+
var commonprefix = text1.substring(0, commonlength);
|
|
31
|
+
text1 = text1.substring(commonlength);
|
|
32
|
+
text2 = text2.substring(commonlength);
|
|
33
|
+
commonlength = diff_commonSuffix(text1, text2);
|
|
34
|
+
var commonsuffix = text1.substring(text1.length - commonlength);
|
|
35
|
+
text1 = text1.substring(0, text1.length - commonlength);
|
|
36
|
+
text2 = text2.substring(0, text2.length - commonlength);
|
|
37
|
+
var diffs = diff_compute_(text1, text2);
|
|
38
|
+
if (commonprefix) {
|
|
39
|
+
diffs.unshift([DIFF_EQUAL, commonprefix]);
|
|
40
|
+
}
|
|
41
|
+
if (commonsuffix) {
|
|
42
|
+
diffs.push([DIFF_EQUAL, commonsuffix]);
|
|
43
|
+
}
|
|
44
|
+
diff_cleanupMerge(diffs, _fix_unicode);
|
|
45
|
+
if (cleanup) {
|
|
46
|
+
diff_cleanupSemantic(diffs);
|
|
47
|
+
}
|
|
48
|
+
return diffs;
|
|
49
|
+
}
|
|
50
|
+
function diff_compute_(text1, text2) {
|
|
51
|
+
var diffs;
|
|
52
|
+
if (!text1) {
|
|
53
|
+
return [[DIFF_INSERT, text2]];
|
|
54
|
+
}
|
|
55
|
+
if (!text2) {
|
|
56
|
+
return [[DIFF_DELETE, text1]];
|
|
57
|
+
}
|
|
58
|
+
var longtext = text1.length > text2.length ? text1 : text2;
|
|
59
|
+
var shorttext = text1.length > text2.length ? text2 : text1;
|
|
60
|
+
var i = longtext.indexOf(shorttext);
|
|
61
|
+
if (i !== -1) {
|
|
62
|
+
diffs = [
|
|
63
|
+
[DIFF_INSERT, longtext.substring(0, i)],
|
|
64
|
+
[DIFF_EQUAL, shorttext],
|
|
65
|
+
[DIFF_INSERT, longtext.substring(i + shorttext.length)]
|
|
66
|
+
];
|
|
67
|
+
if (text1.length > text2.length) {
|
|
68
|
+
diffs[0][0] = diffs[2][0] = DIFF_DELETE;
|
|
69
|
+
}
|
|
70
|
+
return diffs;
|
|
71
|
+
}
|
|
72
|
+
if (shorttext.length === 1) {
|
|
73
|
+
return [
|
|
74
|
+
[DIFF_DELETE, text1],
|
|
75
|
+
[DIFF_INSERT, text2]
|
|
76
|
+
];
|
|
77
|
+
}
|
|
78
|
+
var hm = diff_halfMatch_(text1, text2);
|
|
79
|
+
if (hm) {
|
|
80
|
+
var text1_a = hm[0];
|
|
81
|
+
var text1_b = hm[1];
|
|
82
|
+
var text2_a = hm[2];
|
|
83
|
+
var text2_b = hm[3];
|
|
84
|
+
var mid_common = hm[4];
|
|
85
|
+
var diffs_a = diff_main(text1_a, text2_a);
|
|
86
|
+
var diffs_b = diff_main(text1_b, text2_b);
|
|
87
|
+
return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b);
|
|
88
|
+
}
|
|
89
|
+
return diff_bisect_(text1, text2);
|
|
90
|
+
}
|
|
91
|
+
function diff_bisect_(text1, text2) {
|
|
92
|
+
var text1_length = text1.length;
|
|
93
|
+
var text2_length = text2.length;
|
|
94
|
+
var max_d = Math.ceil((text1_length + text2_length) / 2);
|
|
95
|
+
var v_offset = max_d;
|
|
96
|
+
var v_length = 2 * max_d;
|
|
97
|
+
var v1 = new Array(v_length);
|
|
98
|
+
var v2 = new Array(v_length);
|
|
99
|
+
for (var x = 0; x < v_length; x++) {
|
|
100
|
+
v1[x] = -1;
|
|
101
|
+
v2[x] = -1;
|
|
102
|
+
}
|
|
103
|
+
v1[v_offset + 1] = 0;
|
|
104
|
+
v2[v_offset + 1] = 0;
|
|
105
|
+
var delta = text1_length - text2_length;
|
|
106
|
+
var front = delta % 2 !== 0;
|
|
107
|
+
var k1start = 0;
|
|
108
|
+
var k1end = 0;
|
|
109
|
+
var k2start = 0;
|
|
110
|
+
var k2end = 0;
|
|
111
|
+
for (var d = 0; d < max_d; d++) {
|
|
112
|
+
for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {
|
|
113
|
+
var k1_offset = v_offset + k1;
|
|
114
|
+
var x1;
|
|
115
|
+
if (k1 === -d || k1 !== d && v1[k1_offset - 1] < v1[k1_offset + 1]) {
|
|
116
|
+
x1 = v1[k1_offset + 1];
|
|
117
|
+
} else {
|
|
118
|
+
x1 = v1[k1_offset - 1] + 1;
|
|
119
|
+
}
|
|
120
|
+
var y1 = x1 - k1;
|
|
121
|
+
while (x1 < text1_length && y1 < text2_length && text1.charAt(x1) === text2.charAt(y1)) {
|
|
122
|
+
x1++;
|
|
123
|
+
y1++;
|
|
124
|
+
}
|
|
125
|
+
v1[k1_offset] = x1;
|
|
126
|
+
if (x1 > text1_length) {
|
|
127
|
+
k1end += 2;
|
|
128
|
+
} else if (y1 > text2_length) {
|
|
129
|
+
k1start += 2;
|
|
130
|
+
} else if (front) {
|
|
131
|
+
var k2_offset = v_offset + delta - k1;
|
|
132
|
+
if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] !== -1) {
|
|
133
|
+
var x2 = text1_length - v2[k2_offset];
|
|
134
|
+
if (x1 >= x2) {
|
|
135
|
+
return diff_bisectSplit_(text1, text2, x1, y1);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {
|
|
141
|
+
var k2_offset = v_offset + k2;
|
|
142
|
+
var x2;
|
|
143
|
+
if (k2 === -d || k2 !== d && v2[k2_offset - 1] < v2[k2_offset + 1]) {
|
|
144
|
+
x2 = v2[k2_offset + 1];
|
|
145
|
+
} else {
|
|
146
|
+
x2 = v2[k2_offset - 1] + 1;
|
|
147
|
+
}
|
|
148
|
+
var y2 = x2 - k2;
|
|
149
|
+
while (x2 < text1_length && y2 < text2_length && text1.charAt(text1_length - x2 - 1) === text2.charAt(text2_length - y2 - 1)) {
|
|
150
|
+
x2++;
|
|
151
|
+
y2++;
|
|
152
|
+
}
|
|
153
|
+
v2[k2_offset] = x2;
|
|
154
|
+
if (x2 > text1_length) {
|
|
155
|
+
k2end += 2;
|
|
156
|
+
} else if (y2 > text2_length) {
|
|
157
|
+
k2start += 2;
|
|
158
|
+
} else if (!front) {
|
|
159
|
+
var k1_offset = v_offset + delta - k2;
|
|
160
|
+
if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] !== -1) {
|
|
161
|
+
var x1 = v1[k1_offset];
|
|
162
|
+
var y1 = v_offset + x1 - k1_offset;
|
|
163
|
+
x2 = text1_length - x2;
|
|
164
|
+
if (x1 >= x2) {
|
|
165
|
+
return diff_bisectSplit_(text1, text2, x1, y1);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return [
|
|
172
|
+
[DIFF_DELETE, text1],
|
|
173
|
+
[DIFF_INSERT, text2]
|
|
174
|
+
];
|
|
175
|
+
}
|
|
176
|
+
function diff_bisectSplit_(text1, text2, x, y) {
|
|
177
|
+
var text1a = text1.substring(0, x);
|
|
178
|
+
var text2a = text2.substring(0, y);
|
|
179
|
+
var text1b = text1.substring(x);
|
|
180
|
+
var text2b = text2.substring(y);
|
|
181
|
+
var diffs = diff_main(text1a, text2a);
|
|
182
|
+
var diffsb = diff_main(text1b, text2b);
|
|
183
|
+
return diffs.concat(diffsb);
|
|
184
|
+
}
|
|
185
|
+
function diff_commonPrefix(text1, text2) {
|
|
186
|
+
if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0)) {
|
|
187
|
+
return 0;
|
|
188
|
+
}
|
|
189
|
+
var pointermin = 0;
|
|
190
|
+
var pointermax = Math.min(text1.length, text2.length);
|
|
191
|
+
var pointermid = pointermax;
|
|
192
|
+
var pointerstart = 0;
|
|
193
|
+
while (pointermin < pointermid) {
|
|
194
|
+
if (text1.substring(pointerstart, pointermid) == text2.substring(pointerstart, pointermid)) {
|
|
195
|
+
pointermin = pointermid;
|
|
196
|
+
pointerstart = pointermin;
|
|
197
|
+
} else {
|
|
198
|
+
pointermax = pointermid;
|
|
199
|
+
}
|
|
200
|
+
pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);
|
|
201
|
+
}
|
|
202
|
+
if (is_surrogate_pair_start(text1.charCodeAt(pointermid - 1))) {
|
|
203
|
+
pointermid--;
|
|
204
|
+
}
|
|
205
|
+
return pointermid;
|
|
206
|
+
}
|
|
207
|
+
function diff_commonOverlap_(text1, text2) {
|
|
208
|
+
var text1_length = text1.length;
|
|
209
|
+
var text2_length = text2.length;
|
|
210
|
+
if (text1_length == 0 || text2_length == 0) {
|
|
211
|
+
return 0;
|
|
212
|
+
}
|
|
213
|
+
if (text1_length > text2_length) {
|
|
214
|
+
text1 = text1.substring(text1_length - text2_length);
|
|
215
|
+
} else if (text1_length < text2_length) {
|
|
216
|
+
text2 = text2.substring(0, text1_length);
|
|
217
|
+
}
|
|
218
|
+
var text_length = Math.min(text1_length, text2_length);
|
|
219
|
+
if (text1 == text2) {
|
|
220
|
+
return text_length;
|
|
221
|
+
}
|
|
222
|
+
var best = 0;
|
|
223
|
+
var length = 1;
|
|
224
|
+
while (true) {
|
|
225
|
+
var pattern = text1.substring(text_length - length);
|
|
226
|
+
var found = text2.indexOf(pattern);
|
|
227
|
+
if (found == -1) {
|
|
228
|
+
return best;
|
|
229
|
+
}
|
|
230
|
+
length += found;
|
|
231
|
+
if (found == 0 || text1.substring(text_length - length) == text2.substring(0, length)) {
|
|
232
|
+
best = length;
|
|
233
|
+
length++;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
function diff_commonSuffix(text1, text2) {
|
|
238
|
+
if (!text1 || !text2 || text1.slice(-1) !== text2.slice(-1)) {
|
|
239
|
+
return 0;
|
|
240
|
+
}
|
|
241
|
+
var pointermin = 0;
|
|
242
|
+
var pointermax = Math.min(text1.length, text2.length);
|
|
243
|
+
var pointermid = pointermax;
|
|
244
|
+
var pointerend = 0;
|
|
245
|
+
while (pointermin < pointermid) {
|
|
246
|
+
if (text1.substring(text1.length - pointermid, text1.length - pointerend) == text2.substring(text2.length - pointermid, text2.length - pointerend)) {
|
|
247
|
+
pointermin = pointermid;
|
|
248
|
+
pointerend = pointermin;
|
|
249
|
+
} else {
|
|
250
|
+
pointermax = pointermid;
|
|
251
|
+
}
|
|
252
|
+
pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);
|
|
253
|
+
}
|
|
254
|
+
if (is_surrogate_pair_end(text1.charCodeAt(text1.length - pointermid))) {
|
|
255
|
+
pointermid--;
|
|
256
|
+
}
|
|
257
|
+
return pointermid;
|
|
258
|
+
}
|
|
259
|
+
function diff_halfMatch_(text1, text2) {
|
|
260
|
+
var longtext = text1.length > text2.length ? text1 : text2;
|
|
261
|
+
var shorttext = text1.length > text2.length ? text2 : text1;
|
|
262
|
+
if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {
|
|
263
|
+
return null;
|
|
264
|
+
}
|
|
265
|
+
function diff_halfMatchI_(longtext2, shorttext2, i) {
|
|
266
|
+
var seed = longtext2.substring(i, i + Math.floor(longtext2.length / 4));
|
|
267
|
+
var j = -1;
|
|
268
|
+
var best_common = "";
|
|
269
|
+
var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;
|
|
270
|
+
while ((j = shorttext2.indexOf(seed, j + 1)) !== -1) {
|
|
271
|
+
var prefixLength = diff_commonPrefix(
|
|
272
|
+
longtext2.substring(i),
|
|
273
|
+
shorttext2.substring(j)
|
|
274
|
+
);
|
|
275
|
+
var suffixLength = diff_commonSuffix(
|
|
276
|
+
longtext2.substring(0, i),
|
|
277
|
+
shorttext2.substring(0, j)
|
|
278
|
+
);
|
|
279
|
+
if (best_common.length < suffixLength + prefixLength) {
|
|
280
|
+
best_common = shorttext2.substring(j - suffixLength, j) + shorttext2.substring(j, j + prefixLength);
|
|
281
|
+
best_longtext_a = longtext2.substring(0, i - suffixLength);
|
|
282
|
+
best_longtext_b = longtext2.substring(i + prefixLength);
|
|
283
|
+
best_shorttext_a = shorttext2.substring(0, j - suffixLength);
|
|
284
|
+
best_shorttext_b = shorttext2.substring(j + prefixLength);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
if (best_common.length * 2 >= longtext2.length) {
|
|
288
|
+
return [
|
|
289
|
+
best_longtext_a,
|
|
290
|
+
best_longtext_b,
|
|
291
|
+
best_shorttext_a,
|
|
292
|
+
best_shorttext_b,
|
|
293
|
+
best_common
|
|
294
|
+
];
|
|
295
|
+
} else {
|
|
296
|
+
return null;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
var hm1 = diff_halfMatchI_(
|
|
300
|
+
longtext,
|
|
301
|
+
shorttext,
|
|
302
|
+
Math.ceil(longtext.length / 4)
|
|
303
|
+
);
|
|
304
|
+
var hm2 = diff_halfMatchI_(
|
|
305
|
+
longtext,
|
|
306
|
+
shorttext,
|
|
307
|
+
Math.ceil(longtext.length / 2)
|
|
308
|
+
);
|
|
309
|
+
var hm;
|
|
310
|
+
if (!hm1 && !hm2) {
|
|
311
|
+
return null;
|
|
312
|
+
} else if (!hm2) {
|
|
313
|
+
hm = hm1;
|
|
314
|
+
} else if (!hm1) {
|
|
315
|
+
hm = hm2;
|
|
316
|
+
} else {
|
|
317
|
+
hm = hm1[4].length > hm2[4].length ? hm1 : hm2;
|
|
318
|
+
}
|
|
319
|
+
var text1_a, text1_b, text2_a, text2_b;
|
|
320
|
+
if (text1.length > text2.length) {
|
|
321
|
+
text1_a = hm[0];
|
|
322
|
+
text1_b = hm[1];
|
|
323
|
+
text2_a = hm[2];
|
|
324
|
+
text2_b = hm[3];
|
|
325
|
+
} else {
|
|
326
|
+
text2_a = hm[0];
|
|
327
|
+
text2_b = hm[1];
|
|
328
|
+
text1_a = hm[2];
|
|
329
|
+
text1_b = hm[3];
|
|
330
|
+
}
|
|
331
|
+
var mid_common = hm[4];
|
|
332
|
+
return [text1_a, text1_b, text2_a, text2_b, mid_common];
|
|
333
|
+
}
|
|
334
|
+
function diff_cleanupSemantic(diffs) {
|
|
335
|
+
var changes = false;
|
|
336
|
+
var equalities = [];
|
|
337
|
+
var equalitiesLength = 0;
|
|
338
|
+
var lastequality = null;
|
|
339
|
+
var pointer = 0;
|
|
340
|
+
var length_insertions1 = 0;
|
|
341
|
+
var length_deletions1 = 0;
|
|
342
|
+
var length_insertions2 = 0;
|
|
343
|
+
var length_deletions2 = 0;
|
|
344
|
+
while (pointer < diffs.length) {
|
|
345
|
+
if (diffs[pointer][0] == DIFF_EQUAL) {
|
|
346
|
+
equalities[equalitiesLength++] = pointer;
|
|
347
|
+
length_insertions1 = length_insertions2;
|
|
348
|
+
length_deletions1 = length_deletions2;
|
|
349
|
+
length_insertions2 = 0;
|
|
350
|
+
length_deletions2 = 0;
|
|
351
|
+
lastequality = diffs[pointer][1];
|
|
352
|
+
} else {
|
|
353
|
+
if (diffs[pointer][0] == DIFF_INSERT) {
|
|
354
|
+
length_insertions2 += diffs[pointer][1].length;
|
|
355
|
+
} else {
|
|
356
|
+
length_deletions2 += diffs[pointer][1].length;
|
|
357
|
+
}
|
|
358
|
+
if (lastequality && lastequality.length <= Math.max(length_insertions1, length_deletions1) && lastequality.length <= Math.max(length_insertions2, length_deletions2)) {
|
|
359
|
+
diffs.splice(equalities[equalitiesLength - 1], 0, [
|
|
360
|
+
DIFF_DELETE,
|
|
361
|
+
lastequality
|
|
362
|
+
]);
|
|
363
|
+
diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;
|
|
364
|
+
equalitiesLength--;
|
|
365
|
+
equalitiesLength--;
|
|
366
|
+
pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1;
|
|
367
|
+
length_insertions1 = 0;
|
|
368
|
+
length_deletions1 = 0;
|
|
369
|
+
length_insertions2 = 0;
|
|
370
|
+
length_deletions2 = 0;
|
|
371
|
+
lastequality = null;
|
|
372
|
+
changes = true;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
pointer++;
|
|
376
|
+
}
|
|
377
|
+
if (changes) {
|
|
378
|
+
diff_cleanupMerge(diffs);
|
|
379
|
+
}
|
|
380
|
+
diff_cleanupSemanticLossless(diffs);
|
|
381
|
+
pointer = 1;
|
|
382
|
+
while (pointer < diffs.length) {
|
|
383
|
+
if (diffs[pointer - 1][0] == DIFF_DELETE && diffs[pointer][0] == DIFF_INSERT) {
|
|
384
|
+
var deletion = diffs[pointer - 1][1];
|
|
385
|
+
var insertion = diffs[pointer][1];
|
|
386
|
+
var overlap_length1 = diff_commonOverlap_(deletion, insertion);
|
|
387
|
+
var overlap_length2 = diff_commonOverlap_(insertion, deletion);
|
|
388
|
+
if (overlap_length1 >= overlap_length2) {
|
|
389
|
+
if (overlap_length1 >= deletion.length / 2 || overlap_length1 >= insertion.length / 2) {
|
|
390
|
+
diffs.splice(pointer, 0, [
|
|
391
|
+
DIFF_EQUAL,
|
|
392
|
+
insertion.substring(0, overlap_length1)
|
|
393
|
+
]);
|
|
394
|
+
diffs[pointer - 1][1] = deletion.substring(
|
|
395
|
+
0,
|
|
396
|
+
deletion.length - overlap_length1
|
|
397
|
+
);
|
|
398
|
+
diffs[pointer + 1][1] = insertion.substring(overlap_length1);
|
|
399
|
+
pointer++;
|
|
400
|
+
}
|
|
401
|
+
} else {
|
|
402
|
+
if (overlap_length2 >= deletion.length / 2 || overlap_length2 >= insertion.length / 2) {
|
|
403
|
+
diffs.splice(pointer, 0, [
|
|
404
|
+
DIFF_EQUAL,
|
|
405
|
+
deletion.substring(0, overlap_length2)
|
|
406
|
+
]);
|
|
407
|
+
diffs[pointer - 1][0] = DIFF_INSERT;
|
|
408
|
+
diffs[pointer - 1][1] = insertion.substring(
|
|
409
|
+
0,
|
|
410
|
+
insertion.length - overlap_length2
|
|
411
|
+
);
|
|
412
|
+
diffs[pointer + 1][0] = DIFF_DELETE;
|
|
413
|
+
diffs[pointer + 1][1] = deletion.substring(overlap_length2);
|
|
414
|
+
pointer++;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
pointer++;
|
|
418
|
+
}
|
|
419
|
+
pointer++;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
var nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/;
|
|
423
|
+
var whitespaceRegex_ = /\s/;
|
|
424
|
+
var linebreakRegex_ = /[\r\n]/;
|
|
425
|
+
var blanklineEndRegex_ = /\n\r?\n$/;
|
|
426
|
+
var blanklineStartRegex_ = /^\r?\n\r?\n/;
|
|
427
|
+
function diff_cleanupSemanticLossless(diffs) {
|
|
428
|
+
function diff_cleanupSemanticScore_(one, two) {
|
|
429
|
+
if (!one || !two) {
|
|
430
|
+
return 6;
|
|
431
|
+
}
|
|
432
|
+
var char1 = one.charAt(one.length - 1);
|
|
433
|
+
var char2 = two.charAt(0);
|
|
434
|
+
var nonAlphaNumeric1 = char1.match(nonAlphaNumericRegex_);
|
|
435
|
+
var nonAlphaNumeric2 = char2.match(nonAlphaNumericRegex_);
|
|
436
|
+
var whitespace1 = nonAlphaNumeric1 && char1.match(whitespaceRegex_);
|
|
437
|
+
var whitespace2 = nonAlphaNumeric2 && char2.match(whitespaceRegex_);
|
|
438
|
+
var lineBreak1 = whitespace1 && char1.match(linebreakRegex_);
|
|
439
|
+
var lineBreak2 = whitespace2 && char2.match(linebreakRegex_);
|
|
440
|
+
var blankLine1 = lineBreak1 && one.match(blanklineEndRegex_);
|
|
441
|
+
var blankLine2 = lineBreak2 && two.match(blanklineStartRegex_);
|
|
442
|
+
if (blankLine1 || blankLine2) {
|
|
443
|
+
return 5;
|
|
444
|
+
} else if (lineBreak1 || lineBreak2) {
|
|
445
|
+
return 4;
|
|
446
|
+
} else if (nonAlphaNumeric1 && !whitespace1 && whitespace2) {
|
|
447
|
+
return 3;
|
|
448
|
+
} else if (whitespace1 || whitespace2) {
|
|
449
|
+
return 2;
|
|
450
|
+
} else if (nonAlphaNumeric1 || nonAlphaNumeric2) {
|
|
451
|
+
return 1;
|
|
452
|
+
}
|
|
453
|
+
return 0;
|
|
454
|
+
}
|
|
455
|
+
var pointer = 1;
|
|
456
|
+
while (pointer < diffs.length - 1) {
|
|
457
|
+
if (diffs[pointer - 1][0] == DIFF_EQUAL && diffs[pointer + 1][0] == DIFF_EQUAL) {
|
|
458
|
+
var equality1 = diffs[pointer - 1][1];
|
|
459
|
+
var edit = diffs[pointer][1];
|
|
460
|
+
var equality2 = diffs[pointer + 1][1];
|
|
461
|
+
var commonOffset = diff_commonSuffix(equality1, edit);
|
|
462
|
+
if (commonOffset) {
|
|
463
|
+
var commonString = edit.substring(edit.length - commonOffset);
|
|
464
|
+
equality1 = equality1.substring(0, equality1.length - commonOffset);
|
|
465
|
+
edit = commonString + edit.substring(0, edit.length - commonOffset);
|
|
466
|
+
equality2 = commonString + equality2;
|
|
467
|
+
}
|
|
468
|
+
var bestEquality1 = equality1;
|
|
469
|
+
var bestEdit = edit;
|
|
470
|
+
var bestEquality2 = equality2;
|
|
471
|
+
var bestScore = diff_cleanupSemanticScore_(equality1, edit) + diff_cleanupSemanticScore_(edit, equality2);
|
|
472
|
+
while (edit.charAt(0) === equality2.charAt(0)) {
|
|
473
|
+
equality1 += edit.charAt(0);
|
|
474
|
+
edit = edit.substring(1) + equality2.charAt(0);
|
|
475
|
+
equality2 = equality2.substring(1);
|
|
476
|
+
var score = diff_cleanupSemanticScore_(equality1, edit) + diff_cleanupSemanticScore_(edit, equality2);
|
|
477
|
+
if (score >= bestScore) {
|
|
478
|
+
bestScore = score;
|
|
479
|
+
bestEquality1 = equality1;
|
|
480
|
+
bestEdit = edit;
|
|
481
|
+
bestEquality2 = equality2;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
if (diffs[pointer - 1][1] != bestEquality1) {
|
|
485
|
+
if (bestEquality1) {
|
|
486
|
+
diffs[pointer - 1][1] = bestEquality1;
|
|
487
|
+
} else {
|
|
488
|
+
diffs.splice(pointer - 1, 1);
|
|
489
|
+
pointer--;
|
|
490
|
+
}
|
|
491
|
+
diffs[pointer][1] = bestEdit;
|
|
492
|
+
if (bestEquality2) {
|
|
493
|
+
diffs[pointer + 1][1] = bestEquality2;
|
|
494
|
+
} else {
|
|
495
|
+
diffs.splice(pointer + 1, 1);
|
|
496
|
+
pointer--;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
pointer++;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
function diff_cleanupMerge(diffs, fix_unicode) {
|
|
504
|
+
diffs.push([DIFF_EQUAL, ""]);
|
|
505
|
+
var pointer = 0;
|
|
506
|
+
var count_delete = 0;
|
|
507
|
+
var count_insert = 0;
|
|
508
|
+
var text_delete = "";
|
|
509
|
+
var text_insert = "";
|
|
510
|
+
var commonlength;
|
|
511
|
+
while (pointer < diffs.length) {
|
|
512
|
+
if (pointer < diffs.length - 1 && !diffs[pointer][1]) {
|
|
513
|
+
diffs.splice(pointer, 1);
|
|
514
|
+
continue;
|
|
515
|
+
}
|
|
516
|
+
switch (diffs[pointer][0]) {
|
|
517
|
+
case DIFF_INSERT:
|
|
518
|
+
count_insert++;
|
|
519
|
+
text_insert += diffs[pointer][1];
|
|
520
|
+
pointer++;
|
|
521
|
+
break;
|
|
522
|
+
case DIFF_DELETE:
|
|
523
|
+
count_delete++;
|
|
524
|
+
text_delete += diffs[pointer][1];
|
|
525
|
+
pointer++;
|
|
526
|
+
break;
|
|
527
|
+
case DIFF_EQUAL:
|
|
528
|
+
var previous_equality = pointer - count_insert - count_delete - 1;
|
|
529
|
+
if (fix_unicode) {
|
|
530
|
+
if (previous_equality >= 0 && ends_with_pair_start(diffs[previous_equality][1])) {
|
|
531
|
+
var stray = diffs[previous_equality][1].slice(-1);
|
|
532
|
+
diffs[previous_equality][1] = diffs[previous_equality][1].slice(
|
|
533
|
+
0,
|
|
534
|
+
-1
|
|
535
|
+
);
|
|
536
|
+
text_delete = stray + text_delete;
|
|
537
|
+
text_insert = stray + text_insert;
|
|
538
|
+
if (!diffs[previous_equality][1]) {
|
|
539
|
+
diffs.splice(previous_equality, 1);
|
|
540
|
+
pointer--;
|
|
541
|
+
var k = previous_equality - 1;
|
|
542
|
+
if (diffs[k] && diffs[k][0] === DIFF_INSERT) {
|
|
543
|
+
count_insert++;
|
|
544
|
+
text_insert = diffs[k][1] + text_insert;
|
|
545
|
+
k--;
|
|
546
|
+
}
|
|
547
|
+
if (diffs[k] && diffs[k][0] === DIFF_DELETE) {
|
|
548
|
+
count_delete++;
|
|
549
|
+
text_delete = diffs[k][1] + text_delete;
|
|
550
|
+
k--;
|
|
551
|
+
}
|
|
552
|
+
previous_equality = k;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
if (starts_with_pair_end(diffs[pointer][1])) {
|
|
556
|
+
var stray = diffs[pointer][1].charAt(0);
|
|
557
|
+
diffs[pointer][1] = diffs[pointer][1].slice(1);
|
|
558
|
+
text_delete += stray;
|
|
559
|
+
text_insert += stray;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
if (pointer < diffs.length - 1 && !diffs[pointer][1]) {
|
|
563
|
+
diffs.splice(pointer, 1);
|
|
564
|
+
break;
|
|
565
|
+
}
|
|
566
|
+
if (text_delete.length > 0 || text_insert.length > 0) {
|
|
567
|
+
if (text_delete.length > 0 && text_insert.length > 0) {
|
|
568
|
+
commonlength = diff_commonPrefix(text_insert, text_delete);
|
|
569
|
+
if (commonlength !== 0) {
|
|
570
|
+
if (previous_equality >= 0) {
|
|
571
|
+
diffs[previous_equality][1] += text_insert.substring(
|
|
572
|
+
0,
|
|
573
|
+
commonlength
|
|
574
|
+
);
|
|
575
|
+
} else {
|
|
576
|
+
diffs.splice(0, 0, [
|
|
577
|
+
DIFF_EQUAL,
|
|
578
|
+
text_insert.substring(0, commonlength)
|
|
579
|
+
]);
|
|
580
|
+
pointer++;
|
|
581
|
+
}
|
|
582
|
+
text_insert = text_insert.substring(commonlength);
|
|
583
|
+
text_delete = text_delete.substring(commonlength);
|
|
584
|
+
}
|
|
585
|
+
commonlength = diff_commonSuffix(text_insert, text_delete);
|
|
586
|
+
if (commonlength !== 0) {
|
|
587
|
+
diffs[pointer][1] = text_insert.substring(text_insert.length - commonlength) + diffs[pointer][1];
|
|
588
|
+
text_insert = text_insert.substring(
|
|
589
|
+
0,
|
|
590
|
+
text_insert.length - commonlength
|
|
591
|
+
);
|
|
592
|
+
text_delete = text_delete.substring(
|
|
593
|
+
0,
|
|
594
|
+
text_delete.length - commonlength
|
|
595
|
+
);
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
var n = count_insert + count_delete;
|
|
599
|
+
if (text_delete.length === 0 && text_insert.length === 0) {
|
|
600
|
+
diffs.splice(pointer - n, n);
|
|
601
|
+
pointer = pointer - n;
|
|
602
|
+
} else if (text_delete.length === 0) {
|
|
603
|
+
diffs.splice(pointer - n, n, [DIFF_INSERT, text_insert]);
|
|
604
|
+
pointer = pointer - n + 1;
|
|
605
|
+
} else if (text_insert.length === 0) {
|
|
606
|
+
diffs.splice(pointer - n, n, [DIFF_DELETE, text_delete]);
|
|
607
|
+
pointer = pointer - n + 1;
|
|
608
|
+
} else {
|
|
609
|
+
diffs.splice(
|
|
610
|
+
pointer - n,
|
|
611
|
+
n,
|
|
612
|
+
[DIFF_DELETE, text_delete],
|
|
613
|
+
[DIFF_INSERT, text_insert]
|
|
614
|
+
);
|
|
615
|
+
pointer = pointer - n + 2;
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
if (pointer !== 0 && diffs[pointer - 1][0] === DIFF_EQUAL) {
|
|
619
|
+
diffs[pointer - 1][1] += diffs[pointer][1];
|
|
620
|
+
diffs.splice(pointer, 1);
|
|
621
|
+
} else {
|
|
622
|
+
pointer++;
|
|
623
|
+
}
|
|
624
|
+
count_insert = 0;
|
|
625
|
+
count_delete = 0;
|
|
626
|
+
text_delete = "";
|
|
627
|
+
text_insert = "";
|
|
628
|
+
break;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
if (diffs[diffs.length - 1][1] === "") {
|
|
632
|
+
diffs.pop();
|
|
633
|
+
}
|
|
634
|
+
var changes = false;
|
|
635
|
+
pointer = 1;
|
|
636
|
+
while (pointer < diffs.length - 1) {
|
|
637
|
+
if (diffs[pointer - 1][0] === DIFF_EQUAL && diffs[pointer + 1][0] === DIFF_EQUAL) {
|
|
638
|
+
if (diffs[pointer][1].substring(
|
|
639
|
+
diffs[pointer][1].length - diffs[pointer - 1][1].length
|
|
640
|
+
) === diffs[pointer - 1][1]) {
|
|
641
|
+
diffs[pointer][1] = diffs[pointer - 1][1] + diffs[pointer][1].substring(
|
|
642
|
+
0,
|
|
643
|
+
diffs[pointer][1].length - diffs[pointer - 1][1].length
|
|
644
|
+
);
|
|
645
|
+
diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];
|
|
646
|
+
diffs.splice(pointer - 1, 1);
|
|
647
|
+
changes = true;
|
|
648
|
+
} else if (diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) == diffs[pointer + 1][1]) {
|
|
649
|
+
diffs[pointer - 1][1] += diffs[pointer + 1][1];
|
|
650
|
+
diffs[pointer][1] = diffs[pointer][1].substring(diffs[pointer + 1][1].length) + diffs[pointer + 1][1];
|
|
651
|
+
diffs.splice(pointer + 1, 1);
|
|
652
|
+
changes = true;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
pointer++;
|
|
656
|
+
}
|
|
657
|
+
if (changes) {
|
|
658
|
+
diff_cleanupMerge(diffs, fix_unicode);
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
function is_surrogate_pair_start(charCode) {
|
|
662
|
+
return charCode >= 55296 && charCode <= 56319;
|
|
663
|
+
}
|
|
664
|
+
function is_surrogate_pair_end(charCode) {
|
|
665
|
+
return charCode >= 56320 && charCode <= 57343;
|
|
666
|
+
}
|
|
667
|
+
function starts_with_pair_end(str) {
|
|
668
|
+
return is_surrogate_pair_end(str.charCodeAt(0));
|
|
669
|
+
}
|
|
670
|
+
function ends_with_pair_start(str) {
|
|
671
|
+
return is_surrogate_pair_start(str.charCodeAt(str.length - 1));
|
|
672
|
+
}
|
|
673
|
+
function remove_empty_tuples(tuples) {
|
|
674
|
+
var ret = [];
|
|
675
|
+
for (var i = 0; i < tuples.length; i++) {
|
|
676
|
+
if (tuples[i][1].length > 0) {
|
|
677
|
+
ret.push(tuples[i]);
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
return ret;
|
|
681
|
+
}
|
|
682
|
+
function make_edit_splice(before, oldMiddle, newMiddle, after) {
|
|
683
|
+
if (ends_with_pair_start(before) || starts_with_pair_end(after)) {
|
|
684
|
+
return null;
|
|
685
|
+
}
|
|
686
|
+
return remove_empty_tuples([
|
|
687
|
+
[DIFF_EQUAL, before],
|
|
688
|
+
[DIFF_DELETE, oldMiddle],
|
|
689
|
+
[DIFF_INSERT, newMiddle],
|
|
690
|
+
[DIFF_EQUAL, after]
|
|
691
|
+
]);
|
|
692
|
+
}
|
|
693
|
+
function find_cursor_edit_diff(oldText, newText, cursor_pos) {
|
|
694
|
+
var oldRange = typeof cursor_pos === "number" ? { index: cursor_pos, length: 0 } : cursor_pos.oldRange;
|
|
695
|
+
var newRange = typeof cursor_pos === "number" ? null : cursor_pos.newRange;
|
|
696
|
+
var oldLength = oldText.length;
|
|
697
|
+
var newLength = newText.length;
|
|
698
|
+
if (oldRange.length === 0 && (newRange === null || newRange.length === 0)) {
|
|
699
|
+
var oldCursor = oldRange.index;
|
|
700
|
+
var oldBefore = oldText.slice(0, oldCursor);
|
|
701
|
+
var oldAfter = oldText.slice(oldCursor);
|
|
702
|
+
var maybeNewCursor = newRange ? newRange.index : null;
|
|
703
|
+
editBefore: {
|
|
704
|
+
var newCursor = oldCursor + newLength - oldLength;
|
|
705
|
+
if (maybeNewCursor !== null && maybeNewCursor !== newCursor) {
|
|
706
|
+
break editBefore;
|
|
707
|
+
}
|
|
708
|
+
if (newCursor < 0 || newCursor > newLength) {
|
|
709
|
+
break editBefore;
|
|
710
|
+
}
|
|
711
|
+
var newBefore = newText.slice(0, newCursor);
|
|
712
|
+
var newAfter = newText.slice(newCursor);
|
|
713
|
+
if (newAfter !== oldAfter) {
|
|
714
|
+
break editBefore;
|
|
715
|
+
}
|
|
716
|
+
var prefixLength = Math.min(oldCursor, newCursor);
|
|
717
|
+
var oldPrefix = oldBefore.slice(0, prefixLength);
|
|
718
|
+
var newPrefix = newBefore.slice(0, prefixLength);
|
|
719
|
+
if (oldPrefix !== newPrefix) {
|
|
720
|
+
break editBefore;
|
|
721
|
+
}
|
|
722
|
+
var oldMiddle = oldBefore.slice(prefixLength);
|
|
723
|
+
var newMiddle = newBefore.slice(prefixLength);
|
|
724
|
+
return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldAfter);
|
|
725
|
+
}
|
|
726
|
+
editAfter: {
|
|
727
|
+
if (maybeNewCursor !== null && maybeNewCursor !== oldCursor) {
|
|
728
|
+
break editAfter;
|
|
729
|
+
}
|
|
730
|
+
var cursor = oldCursor;
|
|
731
|
+
var newBefore = newText.slice(0, cursor);
|
|
732
|
+
var newAfter = newText.slice(cursor);
|
|
733
|
+
if (newBefore !== oldBefore) {
|
|
734
|
+
break editAfter;
|
|
735
|
+
}
|
|
736
|
+
var suffixLength = Math.min(oldLength - cursor, newLength - cursor);
|
|
737
|
+
var oldSuffix = oldAfter.slice(oldAfter.length - suffixLength);
|
|
738
|
+
var newSuffix = newAfter.slice(newAfter.length - suffixLength);
|
|
739
|
+
if (oldSuffix !== newSuffix) {
|
|
740
|
+
break editAfter;
|
|
741
|
+
}
|
|
742
|
+
var oldMiddle = oldAfter.slice(0, oldAfter.length - suffixLength);
|
|
743
|
+
var newMiddle = newAfter.slice(0, newAfter.length - suffixLength);
|
|
744
|
+
return make_edit_splice(oldBefore, oldMiddle, newMiddle, oldSuffix);
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
if (oldRange.length > 0 && newRange && newRange.length === 0) {
|
|
748
|
+
replaceRange: {
|
|
749
|
+
var oldPrefix = oldText.slice(0, oldRange.index);
|
|
750
|
+
var oldSuffix = oldText.slice(oldRange.index + oldRange.length);
|
|
751
|
+
var prefixLength = oldPrefix.length;
|
|
752
|
+
var suffixLength = oldSuffix.length;
|
|
753
|
+
if (newLength < prefixLength + suffixLength) {
|
|
754
|
+
break replaceRange;
|
|
755
|
+
}
|
|
756
|
+
var newPrefix = newText.slice(0, prefixLength);
|
|
757
|
+
var newSuffix = newText.slice(newLength - suffixLength);
|
|
758
|
+
if (oldPrefix !== newPrefix || oldSuffix !== newSuffix) {
|
|
759
|
+
break replaceRange;
|
|
760
|
+
}
|
|
761
|
+
var oldMiddle = oldText.slice(prefixLength, oldLength - suffixLength);
|
|
762
|
+
var newMiddle = newText.slice(prefixLength, newLength - suffixLength);
|
|
763
|
+
return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldSuffix);
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
return null;
|
|
767
|
+
}
|
|
768
|
+
function diff(text1, text2, cursor_pos, cleanup) {
|
|
769
|
+
return diff_main(text1, text2, cursor_pos, cleanup, true);
|
|
770
|
+
}
|
|
771
|
+
diff.INSERT = DIFF_INSERT;
|
|
772
|
+
diff.DELETE = DIFF_DELETE;
|
|
773
|
+
diff.EQUAL = DIFF_EQUAL;
|
|
774
|
+
module.exports = diff;
|
|
775
|
+
}
|
|
776
|
+
});
|
|
777
|
+
|
|
778
|
+
// node_modules/.pnpm/prettier-linter-helpers@1.0.0/node_modules/prettier-linter-helpers/index.js
|
|
779
|
+
var require_prettier_linter_helpers = __commonJS({
|
|
780
|
+
"node_modules/.pnpm/prettier-linter-helpers@1.0.0/node_modules/prettier-linter-helpers/index.js"(exports, module) {
|
|
781
|
+
"use strict";
|
|
782
|
+
init_esm_shims();
|
|
783
|
+
var diff = require_diff();
|
|
784
|
+
var LINE_ENDING_RE = /\r\n|[\r\n\u2028\u2029]/;
|
|
785
|
+
function showInvisibles2(str) {
|
|
786
|
+
let ret = "";
|
|
787
|
+
for (let i = 0; i < str.length; i++) {
|
|
788
|
+
switch (str[i]) {
|
|
789
|
+
case " ":
|
|
790
|
+
ret += "\xB7";
|
|
791
|
+
break;
|
|
792
|
+
case "\n":
|
|
793
|
+
ret += "\u23CE";
|
|
794
|
+
break;
|
|
795
|
+
case " ":
|
|
796
|
+
ret += "\u21B9";
|
|
797
|
+
break;
|
|
798
|
+
case "\r":
|
|
799
|
+
ret += "\u240D";
|
|
800
|
+
break;
|
|
801
|
+
default:
|
|
802
|
+
ret += str[i];
|
|
803
|
+
break;
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
return ret;
|
|
807
|
+
}
|
|
808
|
+
function generateDifferences2(source, prettierSource) {
|
|
809
|
+
const results = diff(source, prettierSource);
|
|
810
|
+
const differences = [];
|
|
811
|
+
const batch = [];
|
|
812
|
+
let offset = 0;
|
|
813
|
+
while (results.length) {
|
|
814
|
+
const result = results.shift();
|
|
815
|
+
const op = result[0];
|
|
816
|
+
const text = result[1];
|
|
817
|
+
switch (op) {
|
|
818
|
+
case diff.INSERT:
|
|
819
|
+
case diff.DELETE:
|
|
820
|
+
batch.push(result);
|
|
821
|
+
break;
|
|
822
|
+
case diff.EQUAL:
|
|
823
|
+
if (results.length) {
|
|
824
|
+
if (batch.length) {
|
|
825
|
+
if (LINE_ENDING_RE.test(text)) {
|
|
826
|
+
flush();
|
|
827
|
+
offset += text.length;
|
|
828
|
+
} else {
|
|
829
|
+
batch.push(result);
|
|
830
|
+
}
|
|
831
|
+
} else {
|
|
832
|
+
offset += text.length;
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
break;
|
|
836
|
+
default:
|
|
837
|
+
throw new Error(`Unexpected fast-diff operation "${op}"`);
|
|
838
|
+
}
|
|
839
|
+
if (batch.length && !results.length) {
|
|
840
|
+
flush();
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
return differences;
|
|
844
|
+
function flush() {
|
|
845
|
+
let aheadDeleteText = "";
|
|
846
|
+
let aheadInsertText = "";
|
|
847
|
+
while (batch.length) {
|
|
848
|
+
const next = batch.shift();
|
|
849
|
+
const op = next[0];
|
|
850
|
+
const text = next[1];
|
|
851
|
+
switch (op) {
|
|
852
|
+
case diff.INSERT:
|
|
853
|
+
aheadInsertText += text;
|
|
854
|
+
break;
|
|
855
|
+
case diff.DELETE:
|
|
856
|
+
aheadDeleteText += text;
|
|
857
|
+
break;
|
|
858
|
+
case diff.EQUAL:
|
|
859
|
+
aheadDeleteText += text;
|
|
860
|
+
aheadInsertText += text;
|
|
861
|
+
break;
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
if (aheadDeleteText && aheadInsertText) {
|
|
865
|
+
differences.push({
|
|
866
|
+
offset,
|
|
867
|
+
operation: generateDifferences2.REPLACE,
|
|
868
|
+
insertText: aheadInsertText,
|
|
869
|
+
deleteText: aheadDeleteText
|
|
870
|
+
});
|
|
871
|
+
} else if (!aheadDeleteText && aheadInsertText) {
|
|
872
|
+
differences.push({
|
|
873
|
+
offset,
|
|
874
|
+
operation: generateDifferences2.INSERT,
|
|
875
|
+
insertText: aheadInsertText
|
|
876
|
+
});
|
|
877
|
+
} else if (aheadDeleteText && !aheadInsertText) {
|
|
878
|
+
differences.push({
|
|
879
|
+
offset,
|
|
880
|
+
operation: generateDifferences2.DELETE,
|
|
881
|
+
deleteText: aheadDeleteText
|
|
882
|
+
});
|
|
883
|
+
}
|
|
884
|
+
offset += aheadDeleteText.length;
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
generateDifferences2.INSERT = "insert";
|
|
888
|
+
generateDifferences2.DELETE = "delete";
|
|
889
|
+
generateDifferences2.REPLACE = "replace";
|
|
890
|
+
module.exports = {
|
|
891
|
+
showInvisibles: showInvisibles2,
|
|
892
|
+
generateDifferences: generateDifferences2
|
|
893
|
+
};
|
|
894
|
+
}
|
|
895
|
+
});
|
|
896
|
+
|
|
897
|
+
// node_modules/.pnpm/eslint-plugin-format-lua@1.0.0_eslint@9.25.1_jiti@2.4.2_/node_modules/eslint-plugin-format-lua/dist/index.mjs
|
|
898
|
+
init_esm_shims();
|
|
899
|
+
|
|
900
|
+
// node_modules/.pnpm/eslint-parser-plain@0.1.1/node_modules/eslint-parser-plain/dist/index.mjs
|
|
901
|
+
var dist_exports = {};
|
|
902
|
+
__export(dist_exports, {
|
|
903
|
+
meta: () => meta,
|
|
904
|
+
parseForESLint: () => parseForESLint
|
|
905
|
+
});
|
|
906
|
+
init_esm_shims();
|
|
907
|
+
var name = "eslint-parser-plain";
|
|
908
|
+
var version = "0.1.1";
|
|
909
|
+
var parseForESLint = (code) => ({
|
|
910
|
+
ast: {
|
|
911
|
+
type: "Program",
|
|
912
|
+
loc: { start: 0, end: code.length },
|
|
913
|
+
range: [0, code.length],
|
|
914
|
+
body: [],
|
|
915
|
+
comments: [],
|
|
916
|
+
tokens: []
|
|
917
|
+
},
|
|
918
|
+
services: { isPlain: true },
|
|
919
|
+
scopeManager: null,
|
|
920
|
+
visitorKeys: {
|
|
921
|
+
Program: []
|
|
922
|
+
}
|
|
923
|
+
});
|
|
924
|
+
var meta = {
|
|
925
|
+
name,
|
|
926
|
+
version
|
|
927
|
+
};
|
|
928
|
+
|
|
929
|
+
// node_modules/.pnpm/@johnnymorganz+stylua@2.1.0/node_modules/@johnnymorganz/stylua/stylua_lib.mjs
|
|
930
|
+
init_esm_shims();
|
|
931
|
+
import fs from "node:fs";
|
|
932
|
+
|
|
933
|
+
// node_modules/.pnpm/@johnnymorganz+stylua@2.1.0/node_modules/@johnnymorganz/stylua/stylua.web/stylua_lib.js
|
|
934
|
+
init_esm_shims();
|
|
935
|
+
var wasm;
|
|
936
|
+
var cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", { ignoreBOM: true, fatal: true }) : { decode: () => {
|
|
937
|
+
throw Error("TextDecoder not available");
|
|
938
|
+
} };
|
|
939
|
+
if (typeof TextDecoder !== "undefined") {
|
|
940
|
+
cachedTextDecoder.decode();
|
|
941
|
+
}
|
|
942
|
+
var cachedUint8Memory0 = null;
|
|
943
|
+
function getUint8Memory0() {
|
|
944
|
+
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
945
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
946
|
+
}
|
|
947
|
+
return cachedUint8Memory0;
|
|
948
|
+
}
|
|
949
|
+
function getStringFromWasm0(ptr, len) {
|
|
950
|
+
ptr = ptr >>> 0;
|
|
951
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
952
|
+
}
|
|
953
|
+
var heap = new Array(128).fill(void 0);
|
|
954
|
+
heap.push(void 0, null, true, false);
|
|
955
|
+
var heap_next = heap.length;
|
|
956
|
+
function addHeapObject(obj) {
|
|
957
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
958
|
+
const idx = heap_next;
|
|
959
|
+
heap_next = heap[idx];
|
|
960
|
+
heap[idx] = obj;
|
|
961
|
+
return idx;
|
|
962
|
+
}
|
|
963
|
+
var cachedInt32Memory0 = null;
|
|
964
|
+
function getInt32Memory0() {
|
|
965
|
+
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
966
|
+
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
967
|
+
}
|
|
968
|
+
return cachedInt32Memory0;
|
|
969
|
+
}
|
|
970
|
+
function isLikeNone(x) {
|
|
971
|
+
return x === void 0 || x === null;
|
|
972
|
+
}
|
|
973
|
+
function _assertClass(instance, klass) {
|
|
974
|
+
if (!(instance instanceof klass)) {
|
|
975
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
976
|
+
}
|
|
977
|
+
return instance.ptr;
|
|
978
|
+
}
|
|
979
|
+
var WASM_VECTOR_LEN = 0;
|
|
980
|
+
var cachedTextEncoder = typeof TextEncoder !== "undefined" ? new TextEncoder("utf-8") : { encode: () => {
|
|
981
|
+
throw Error("TextEncoder not available");
|
|
982
|
+
} };
|
|
983
|
+
var encodeString = typeof cachedTextEncoder.encodeInto === "function" ? function(arg, view) {
|
|
984
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
985
|
+
} : function(arg, view) {
|
|
986
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
987
|
+
view.set(buf);
|
|
988
|
+
return {
|
|
989
|
+
read: arg.length,
|
|
990
|
+
written: buf.length
|
|
991
|
+
};
|
|
992
|
+
};
|
|
993
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
994
|
+
if (realloc === void 0) {
|
|
995
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
996
|
+
const ptr2 = malloc(buf.length, 1) >>> 0;
|
|
997
|
+
getUint8Memory0().subarray(ptr2, ptr2 + buf.length).set(buf);
|
|
998
|
+
WASM_VECTOR_LEN = buf.length;
|
|
999
|
+
return ptr2;
|
|
1000
|
+
}
|
|
1001
|
+
let len = arg.length;
|
|
1002
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
1003
|
+
const mem = getUint8Memory0();
|
|
1004
|
+
let offset = 0;
|
|
1005
|
+
for (; offset < len; offset++) {
|
|
1006
|
+
const code = arg.charCodeAt(offset);
|
|
1007
|
+
if (code > 127) break;
|
|
1008
|
+
mem[ptr + offset] = code;
|
|
1009
|
+
}
|
|
1010
|
+
if (offset !== len) {
|
|
1011
|
+
if (offset !== 0) {
|
|
1012
|
+
arg = arg.slice(offset);
|
|
1013
|
+
}
|
|
1014
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
1015
|
+
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
|
1016
|
+
const ret = encodeString(arg, view);
|
|
1017
|
+
offset += ret.written;
|
|
1018
|
+
}
|
|
1019
|
+
WASM_VECTOR_LEN = offset;
|
|
1020
|
+
return ptr;
|
|
1021
|
+
}
|
|
1022
|
+
function getObject(idx) {
|
|
1023
|
+
return heap[idx];
|
|
1024
|
+
}
|
|
1025
|
+
function dropObject(idx) {
|
|
1026
|
+
if (idx < 132) return;
|
|
1027
|
+
heap[idx] = heap_next;
|
|
1028
|
+
heap_next = idx;
|
|
1029
|
+
}
|
|
1030
|
+
function takeObject(idx) {
|
|
1031
|
+
const ret = getObject(idx);
|
|
1032
|
+
dropObject(idx);
|
|
1033
|
+
return ret;
|
|
1034
|
+
}
|
|
1035
|
+
function formatCode(code, config, range, verify_output) {
|
|
1036
|
+
let deferred5_0;
|
|
1037
|
+
let deferred5_1;
|
|
1038
|
+
try {
|
|
1039
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1040
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1041
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1042
|
+
_assertClass(config, Config);
|
|
1043
|
+
var ptr1 = config.__destroy_into_raw();
|
|
1044
|
+
let ptr2 = 0;
|
|
1045
|
+
if (!isLikeNone(range)) {
|
|
1046
|
+
_assertClass(range, Range);
|
|
1047
|
+
ptr2 = range.__destroy_into_raw();
|
|
1048
|
+
}
|
|
1049
|
+
wasm.formatCode(retptr, ptr0, len0, ptr1, ptr2, verify_output);
|
|
1050
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1051
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1052
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
1053
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
1054
|
+
var ptr4 = r0;
|
|
1055
|
+
var len4 = r1;
|
|
1056
|
+
if (r3) {
|
|
1057
|
+
ptr4 = 0;
|
|
1058
|
+
len4 = 0;
|
|
1059
|
+
throw takeObject(r2);
|
|
1060
|
+
}
|
|
1061
|
+
deferred5_0 = ptr4;
|
|
1062
|
+
deferred5_1 = len4;
|
|
1063
|
+
return getStringFromWasm0(ptr4, len4);
|
|
1064
|
+
} finally {
|
|
1065
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1066
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
var LineEndings = Object.freeze({
|
|
1070
|
+
/**
|
|
1071
|
+
* Unix Line Endings (LF) - `\n`
|
|
1072
|
+
*/
|
|
1073
|
+
Unix: 0,
|
|
1074
|
+
"0": "Unix",
|
|
1075
|
+
/**
|
|
1076
|
+
* Windows Line Endings (CRLF) - `\r\n`
|
|
1077
|
+
*/
|
|
1078
|
+
Windows: 1,
|
|
1079
|
+
"1": "Windows"
|
|
1080
|
+
});
|
|
1081
|
+
var OutputVerification = Object.freeze({
|
|
1082
|
+
/**
|
|
1083
|
+
* Reparse the generated output to detect any changes to code correctness.
|
|
1084
|
+
*/
|
|
1085
|
+
Full: 0,
|
|
1086
|
+
"0": "Full",
|
|
1087
|
+
/**
|
|
1088
|
+
* Perform no verification of the output.
|
|
1089
|
+
*/
|
|
1090
|
+
None: 1,
|
|
1091
|
+
"1": "None"
|
|
1092
|
+
});
|
|
1093
|
+
var LuaVersion = Object.freeze({
|
|
1094
|
+
/**
|
|
1095
|
+
* Parse all syntax versions at the same time. This allows most general usage.
|
|
1096
|
+
* For overlapping syntaxes (e.g., Lua5.2 label syntax and Luau type assertions), select a
|
|
1097
|
+
* specific syntax version
|
|
1098
|
+
*/
|
|
1099
|
+
All: 0,
|
|
1100
|
+
"0": "All",
|
|
1101
|
+
/**
|
|
1102
|
+
* Parse Lua 5.1 code
|
|
1103
|
+
*/
|
|
1104
|
+
Lua51: 1,
|
|
1105
|
+
"1": "Lua51",
|
|
1106
|
+
/**
|
|
1107
|
+
* Parse Lua 5.2 code
|
|
1108
|
+
*/
|
|
1109
|
+
Lua52: 2,
|
|
1110
|
+
"2": "Lua52",
|
|
1111
|
+
/**
|
|
1112
|
+
* Parse Lua 5.3 code
|
|
1113
|
+
*/
|
|
1114
|
+
Lua53: 3,
|
|
1115
|
+
"3": "Lua53",
|
|
1116
|
+
/**
|
|
1117
|
+
* Parse Lua 5.4 code
|
|
1118
|
+
*/
|
|
1119
|
+
Lua54: 4,
|
|
1120
|
+
"4": "Lua54",
|
|
1121
|
+
/**
|
|
1122
|
+
* Parse Luau code
|
|
1123
|
+
*/
|
|
1124
|
+
Luau: 5,
|
|
1125
|
+
"5": "Luau",
|
|
1126
|
+
/**
|
|
1127
|
+
* Parse LuaJIT code
|
|
1128
|
+
*/
|
|
1129
|
+
LuaJIT: 6,
|
|
1130
|
+
"6": "LuaJIT",
|
|
1131
|
+
/**
|
|
1132
|
+
* Parse Cfx Lua code
|
|
1133
|
+
*/
|
|
1134
|
+
CfxLua: 7,
|
|
1135
|
+
"7": "CfxLua"
|
|
1136
|
+
});
|
|
1137
|
+
var SpaceAfterFunctionNames = Object.freeze({
|
|
1138
|
+
/**
|
|
1139
|
+
* Never use spaces after function names.
|
|
1140
|
+
*/
|
|
1141
|
+
Never: 0,
|
|
1142
|
+
"0": "Never",
|
|
1143
|
+
/**
|
|
1144
|
+
* Use spaces after function names only for function definitions.
|
|
1145
|
+
*/
|
|
1146
|
+
Definitions: 1,
|
|
1147
|
+
"1": "Definitions",
|
|
1148
|
+
/**
|
|
1149
|
+
* Use spaces after function names only for function calls.
|
|
1150
|
+
*/
|
|
1151
|
+
Calls: 2,
|
|
1152
|
+
"2": "Calls",
|
|
1153
|
+
/**
|
|
1154
|
+
* Use spaces after function names in definitions and calls.
|
|
1155
|
+
*/
|
|
1156
|
+
Always: 3,
|
|
1157
|
+
"3": "Always"
|
|
1158
|
+
});
|
|
1159
|
+
var IndentType = Object.freeze({
|
|
1160
|
+
/**
|
|
1161
|
+
* Indent using tabs (`\t`)
|
|
1162
|
+
*/
|
|
1163
|
+
Tabs: 0,
|
|
1164
|
+
"0": "Tabs",
|
|
1165
|
+
/**
|
|
1166
|
+
* Indent using spaces (` `)
|
|
1167
|
+
*/
|
|
1168
|
+
Spaces: 1,
|
|
1169
|
+
"1": "Spaces"
|
|
1170
|
+
});
|
|
1171
|
+
var QuoteStyle = Object.freeze({
|
|
1172
|
+
/**
|
|
1173
|
+
* Use double quotes where possible, but change to single quotes if it produces less escapes
|
|
1174
|
+
*/
|
|
1175
|
+
AutoPreferDouble: 0,
|
|
1176
|
+
"0": "AutoPreferDouble",
|
|
1177
|
+
/**
|
|
1178
|
+
* Use single quotes where possible, but change to double quotes if it produces less escapes
|
|
1179
|
+
*/
|
|
1180
|
+
AutoPreferSingle: 1,
|
|
1181
|
+
"1": "AutoPreferSingle",
|
|
1182
|
+
/**
|
|
1183
|
+
* Always use double quotes in all strings
|
|
1184
|
+
*/
|
|
1185
|
+
ForceDouble: 2,
|
|
1186
|
+
"2": "ForceDouble",
|
|
1187
|
+
/**
|
|
1188
|
+
* Always use single quotes in all strings
|
|
1189
|
+
*/
|
|
1190
|
+
ForceSingle: 3,
|
|
1191
|
+
"3": "ForceSingle"
|
|
1192
|
+
});
|
|
1193
|
+
var CallParenType = Object.freeze({
|
|
1194
|
+
/**
|
|
1195
|
+
* Use call parentheses all the time
|
|
1196
|
+
*/
|
|
1197
|
+
Always: 0,
|
|
1198
|
+
"0": "Always",
|
|
1199
|
+
/**
|
|
1200
|
+
* Skip call parentheses when only a string argument is used.
|
|
1201
|
+
*/
|
|
1202
|
+
NoSingleString: 1,
|
|
1203
|
+
"1": "NoSingleString",
|
|
1204
|
+
/**
|
|
1205
|
+
* Skip call parentheses when only a table argument is used.
|
|
1206
|
+
*/
|
|
1207
|
+
NoSingleTable: 2,
|
|
1208
|
+
"2": "NoSingleTable",
|
|
1209
|
+
/**
|
|
1210
|
+
* Skip call parentheses when only a table or string argument is used.
|
|
1211
|
+
*/
|
|
1212
|
+
None: 3,
|
|
1213
|
+
"3": "None",
|
|
1214
|
+
/**
|
|
1215
|
+
* Keep call parentheses based on its presence in input code.
|
|
1216
|
+
*/
|
|
1217
|
+
Input: 4,
|
|
1218
|
+
"4": "Input"
|
|
1219
|
+
});
|
|
1220
|
+
var CollapseSimpleStatement = Object.freeze({
|
|
1221
|
+
/**
|
|
1222
|
+
* Never collapse
|
|
1223
|
+
*/
|
|
1224
|
+
Never: 0,
|
|
1225
|
+
"0": "Never",
|
|
1226
|
+
/**
|
|
1227
|
+
* Collapse simple functions onto a single line
|
|
1228
|
+
*/
|
|
1229
|
+
FunctionOnly: 1,
|
|
1230
|
+
"1": "FunctionOnly",
|
|
1231
|
+
/**
|
|
1232
|
+
* Collapse simple if guards onto a single line
|
|
1233
|
+
*/
|
|
1234
|
+
ConditionalOnly: 2,
|
|
1235
|
+
"2": "ConditionalOnly",
|
|
1236
|
+
/**
|
|
1237
|
+
* Collapse all simple statements onto a single line
|
|
1238
|
+
*/
|
|
1239
|
+
Always: 3,
|
|
1240
|
+
"3": "Always"
|
|
1241
|
+
});
|
|
1242
|
+
var Config = class _Config {
|
|
1243
|
+
static __wrap(ptr) {
|
|
1244
|
+
ptr = ptr >>> 0;
|
|
1245
|
+
const obj = Object.create(_Config.prototype);
|
|
1246
|
+
obj.__wbg_ptr = ptr;
|
|
1247
|
+
return obj;
|
|
1248
|
+
}
|
|
1249
|
+
__destroy_into_raw() {
|
|
1250
|
+
const ptr = this.__wbg_ptr;
|
|
1251
|
+
this.__wbg_ptr = 0;
|
|
1252
|
+
return ptr;
|
|
1253
|
+
}
|
|
1254
|
+
free() {
|
|
1255
|
+
const ptr = this.__destroy_into_raw();
|
|
1256
|
+
wasm.__wbg_config_free(ptr);
|
|
1257
|
+
}
|
|
1258
|
+
/**
|
|
1259
|
+
* The type of Lua syntax to parse.
|
|
1260
|
+
* @returns {LuaVersion}
|
|
1261
|
+
*/
|
|
1262
|
+
get syntax() {
|
|
1263
|
+
const ret = wasm.__wbg_get_config_syntax(this.__wbg_ptr);
|
|
1264
|
+
return ret;
|
|
1265
|
+
}
|
|
1266
|
+
/**
|
|
1267
|
+
* The type of Lua syntax to parse.
|
|
1268
|
+
* @param {LuaVersion} arg0
|
|
1269
|
+
*/
|
|
1270
|
+
set syntax(arg0) {
|
|
1271
|
+
wasm.__wbg_set_config_syntax(this.__wbg_ptr, arg0);
|
|
1272
|
+
}
|
|
1273
|
+
/**
|
|
1274
|
+
* The approximate line length to use when printing the code.
|
|
1275
|
+
* This is used as a guide to determine when to wrap lines, but note
|
|
1276
|
+
* that this is not a hard upper bound.
|
|
1277
|
+
* @returns {number}
|
|
1278
|
+
*/
|
|
1279
|
+
get column_width() {
|
|
1280
|
+
const ret = wasm.__wbg_get_config_column_width(this.__wbg_ptr);
|
|
1281
|
+
return ret >>> 0;
|
|
1282
|
+
}
|
|
1283
|
+
/**
|
|
1284
|
+
* The approximate line length to use when printing the code.
|
|
1285
|
+
* This is used as a guide to determine when to wrap lines, but note
|
|
1286
|
+
* that this is not a hard upper bound.
|
|
1287
|
+
* @param {number} arg0
|
|
1288
|
+
*/
|
|
1289
|
+
set column_width(arg0) {
|
|
1290
|
+
wasm.__wbg_set_config_column_width(this.__wbg_ptr, arg0);
|
|
1291
|
+
}
|
|
1292
|
+
/**
|
|
1293
|
+
* The type of line endings to use.
|
|
1294
|
+
* @returns {LineEndings}
|
|
1295
|
+
*/
|
|
1296
|
+
get line_endings() {
|
|
1297
|
+
const ret = wasm.__wbg_get_config_line_endings(this.__wbg_ptr);
|
|
1298
|
+
return ret;
|
|
1299
|
+
}
|
|
1300
|
+
/**
|
|
1301
|
+
* The type of line endings to use.
|
|
1302
|
+
* @param {LineEndings} arg0
|
|
1303
|
+
*/
|
|
1304
|
+
set line_endings(arg0) {
|
|
1305
|
+
wasm.__wbg_set_config_line_endings(this.__wbg_ptr, arg0);
|
|
1306
|
+
}
|
|
1307
|
+
/**
|
|
1308
|
+
* The type of indents to use.
|
|
1309
|
+
* @returns {IndentType}
|
|
1310
|
+
*/
|
|
1311
|
+
get indent_type() {
|
|
1312
|
+
const ret = wasm.__wbg_get_config_indent_type(this.__wbg_ptr);
|
|
1313
|
+
return ret;
|
|
1314
|
+
}
|
|
1315
|
+
/**
|
|
1316
|
+
* The type of indents to use.
|
|
1317
|
+
* @param {IndentType} arg0
|
|
1318
|
+
*/
|
|
1319
|
+
set indent_type(arg0) {
|
|
1320
|
+
wasm.__wbg_set_config_indent_type(this.__wbg_ptr, arg0);
|
|
1321
|
+
}
|
|
1322
|
+
/**
|
|
1323
|
+
* The width of a single indentation level.
|
|
1324
|
+
* If `indent_type` is set to [`IndentType::Spaces`], then this is the number of spaces to use.
|
|
1325
|
+
* If `indent_type` is set to [`IndentType::Tabs`], then this is used as a heuristic to guide when to wrap lines.
|
|
1326
|
+
* @returns {number}
|
|
1327
|
+
*/
|
|
1328
|
+
get indent_width() {
|
|
1329
|
+
const ret = wasm.__wbg_get_config_indent_width(this.__wbg_ptr);
|
|
1330
|
+
return ret >>> 0;
|
|
1331
|
+
}
|
|
1332
|
+
/**
|
|
1333
|
+
* The width of a single indentation level.
|
|
1334
|
+
* If `indent_type` is set to [`IndentType::Spaces`], then this is the number of spaces to use.
|
|
1335
|
+
* If `indent_type` is set to [`IndentType::Tabs`], then this is used as a heuristic to guide when to wrap lines.
|
|
1336
|
+
* @param {number} arg0
|
|
1337
|
+
*/
|
|
1338
|
+
set indent_width(arg0) {
|
|
1339
|
+
wasm.__wbg_set_config_indent_width(this.__wbg_ptr, arg0);
|
|
1340
|
+
}
|
|
1341
|
+
/**
|
|
1342
|
+
* The style of quotes to use in string literals.
|
|
1343
|
+
* @returns {QuoteStyle}
|
|
1344
|
+
*/
|
|
1345
|
+
get quote_style() {
|
|
1346
|
+
const ret = wasm.__wbg_get_config_quote_style(this.__wbg_ptr);
|
|
1347
|
+
return ret;
|
|
1348
|
+
}
|
|
1349
|
+
/**
|
|
1350
|
+
* The style of quotes to use in string literals.
|
|
1351
|
+
* @param {QuoteStyle} arg0
|
|
1352
|
+
*/
|
|
1353
|
+
set quote_style(arg0) {
|
|
1354
|
+
wasm.__wbg_set_config_quote_style(this.__wbg_ptr, arg0);
|
|
1355
|
+
}
|
|
1356
|
+
/**
|
|
1357
|
+
* Whether to omit parentheses around function calls which take a single string literal or table.
|
|
1358
|
+
* This is added for adoption reasons only, and is not recommended for new work.
|
|
1359
|
+
* @returns {boolean}
|
|
1360
|
+
*/
|
|
1361
|
+
get no_call_parentheses() {
|
|
1362
|
+
const ret = wasm.__wbg_get_config_no_call_parentheses(this.__wbg_ptr);
|
|
1363
|
+
return ret !== 0;
|
|
1364
|
+
}
|
|
1365
|
+
/**
|
|
1366
|
+
* Whether to omit parentheses around function calls which take a single string literal or table.
|
|
1367
|
+
* This is added for adoption reasons only, and is not recommended for new work.
|
|
1368
|
+
* @param {boolean} arg0
|
|
1369
|
+
*/
|
|
1370
|
+
set no_call_parentheses(arg0) {
|
|
1371
|
+
wasm.__wbg_set_config_no_call_parentheses(this.__wbg_ptr, arg0);
|
|
1372
|
+
}
|
|
1373
|
+
/**
|
|
1374
|
+
* When to use call parentheses.
|
|
1375
|
+
* if call_parentheses is set to [`CallParenType::Always`] call parentheses is always applied.
|
|
1376
|
+
* if call_parentheses is set to [`CallParenType::NoSingleTable`] call parentheses is omitted when
|
|
1377
|
+
* function is called with only one string argument.
|
|
1378
|
+
* if call_parentheses is set to [`CallParenType::NoSingleTable`] call parentheses is omitted when
|
|
1379
|
+
* function is called with only one table argument.
|
|
1380
|
+
* if call_parentheses is set to [`CallParenType::None`] call parentheses is omitted when
|
|
1381
|
+
* function is called with only one table or string argument (same as no_call_parentheses).
|
|
1382
|
+
* @returns {CallParenType}
|
|
1383
|
+
*/
|
|
1384
|
+
get call_parentheses() {
|
|
1385
|
+
const ret = wasm.__wbg_get_config_call_parentheses(this.__wbg_ptr);
|
|
1386
|
+
return ret;
|
|
1387
|
+
}
|
|
1388
|
+
/**
|
|
1389
|
+
* When to use call parentheses.
|
|
1390
|
+
* if call_parentheses is set to [`CallParenType::Always`] call parentheses is always applied.
|
|
1391
|
+
* if call_parentheses is set to [`CallParenType::NoSingleTable`] call parentheses is omitted when
|
|
1392
|
+
* function is called with only one string argument.
|
|
1393
|
+
* if call_parentheses is set to [`CallParenType::NoSingleTable`] call parentheses is omitted when
|
|
1394
|
+
* function is called with only one table argument.
|
|
1395
|
+
* if call_parentheses is set to [`CallParenType::None`] call parentheses is omitted when
|
|
1396
|
+
* function is called with only one table or string argument (same as no_call_parentheses).
|
|
1397
|
+
* @param {CallParenType} arg0
|
|
1398
|
+
*/
|
|
1399
|
+
set call_parentheses(arg0) {
|
|
1400
|
+
wasm.__wbg_set_config_call_parentheses(this.__wbg_ptr, arg0);
|
|
1401
|
+
}
|
|
1402
|
+
/**
|
|
1403
|
+
* Whether we should collapse simple structures like functions or guard statements
|
|
1404
|
+
* if set to [`CollapseSimpleStatement::None`] structures are never collapsed.
|
|
1405
|
+
* if set to [`CollapseSimpleStatement::FunctionOnly`] then simple functions (i.e., functions with a single laststmt) can be collapsed
|
|
1406
|
+
* @returns {CollapseSimpleStatement}
|
|
1407
|
+
*/
|
|
1408
|
+
get collapse_simple_statement() {
|
|
1409
|
+
const ret = wasm.__wbg_get_config_collapse_simple_statement(this.__wbg_ptr);
|
|
1410
|
+
return ret;
|
|
1411
|
+
}
|
|
1412
|
+
/**
|
|
1413
|
+
* Whether we should collapse simple structures like functions or guard statements
|
|
1414
|
+
* if set to [`CollapseSimpleStatement::None`] structures are never collapsed.
|
|
1415
|
+
* if set to [`CollapseSimpleStatement::FunctionOnly`] then simple functions (i.e., functions with a single laststmt) can be collapsed
|
|
1416
|
+
* @param {CollapseSimpleStatement} arg0
|
|
1417
|
+
*/
|
|
1418
|
+
set collapse_simple_statement(arg0) {
|
|
1419
|
+
wasm.__wbg_set_config_collapse_simple_statement(this.__wbg_ptr, arg0);
|
|
1420
|
+
}
|
|
1421
|
+
/**
|
|
1422
|
+
* Configuration for the sort requires codemod
|
|
1423
|
+
* @returns {SortRequiresConfig}
|
|
1424
|
+
*/
|
|
1425
|
+
get sort_requires() {
|
|
1426
|
+
const ret = wasm.__wbg_get_config_sort_requires(this.__wbg_ptr);
|
|
1427
|
+
return SortRequiresConfig.__wrap(ret);
|
|
1428
|
+
}
|
|
1429
|
+
/**
|
|
1430
|
+
* Configuration for the sort requires codemod
|
|
1431
|
+
* @param {SortRequiresConfig} arg0
|
|
1432
|
+
*/
|
|
1433
|
+
set sort_requires(arg0) {
|
|
1434
|
+
_assertClass(arg0, SortRequiresConfig);
|
|
1435
|
+
var ptr0 = arg0.__destroy_into_raw();
|
|
1436
|
+
wasm.__wbg_set_config_sort_requires(this.__wbg_ptr, ptr0);
|
|
1437
|
+
}
|
|
1438
|
+
/**
|
|
1439
|
+
* Whether we should include a space between the function name and arguments.
|
|
1440
|
+
* * if space_after_function_names is set to [`SpaceAfterFunctionNames::Never`] a space is never used.
|
|
1441
|
+
* * if space_after_function_names is set to [`SpaceAfterFunctionNames::Definitions`] a space is used only for definitions.
|
|
1442
|
+
* * if space_after_function_names is set to [`SpaceAfterFunctionNames::Calls`] a space is used only for calls.
|
|
1443
|
+
* * if space_after_function_names is set to [`SpaceAfterFunctionNames::Always`] a space is used for both definitions and calls.
|
|
1444
|
+
* @returns {SpaceAfterFunctionNames}
|
|
1445
|
+
*/
|
|
1446
|
+
get space_after_function_names() {
|
|
1447
|
+
const ret = wasm.__wbg_get_config_space_after_function_names(this.__wbg_ptr);
|
|
1448
|
+
return ret;
|
|
1449
|
+
}
|
|
1450
|
+
/**
|
|
1451
|
+
* Whether we should include a space between the function name and arguments.
|
|
1452
|
+
* * if space_after_function_names is set to [`SpaceAfterFunctionNames::Never`] a space is never used.
|
|
1453
|
+
* * if space_after_function_names is set to [`SpaceAfterFunctionNames::Definitions`] a space is used only for definitions.
|
|
1454
|
+
* * if space_after_function_names is set to [`SpaceAfterFunctionNames::Calls`] a space is used only for calls.
|
|
1455
|
+
* * if space_after_function_names is set to [`SpaceAfterFunctionNames::Always`] a space is used for both definitions and calls.
|
|
1456
|
+
* @param {SpaceAfterFunctionNames} arg0
|
|
1457
|
+
*/
|
|
1458
|
+
set space_after_function_names(arg0) {
|
|
1459
|
+
wasm.__wbg_set_config_space_after_function_names(this.__wbg_ptr, arg0);
|
|
1460
|
+
}
|
|
1461
|
+
/**
|
|
1462
|
+
* Creates a new Config with the default values
|
|
1463
|
+
* @returns {Config}
|
|
1464
|
+
*/
|
|
1465
|
+
static new() {
|
|
1466
|
+
const ret = wasm.config_new();
|
|
1467
|
+
return _Config.__wrap(ret);
|
|
1468
|
+
}
|
|
1469
|
+
};
|
|
1470
|
+
var Range = class _Range {
|
|
1471
|
+
static __wrap(ptr) {
|
|
1472
|
+
ptr = ptr >>> 0;
|
|
1473
|
+
const obj = Object.create(_Range.prototype);
|
|
1474
|
+
obj.__wbg_ptr = ptr;
|
|
1475
|
+
return obj;
|
|
1476
|
+
}
|
|
1477
|
+
__destroy_into_raw() {
|
|
1478
|
+
const ptr = this.__wbg_ptr;
|
|
1479
|
+
this.__wbg_ptr = 0;
|
|
1480
|
+
return ptr;
|
|
1481
|
+
}
|
|
1482
|
+
free() {
|
|
1483
|
+
const ptr = this.__destroy_into_raw();
|
|
1484
|
+
wasm.__wbg_range_free(ptr);
|
|
1485
|
+
}
|
|
1486
|
+
/**
|
|
1487
|
+
* @returns {number | undefined}
|
|
1488
|
+
*/
|
|
1489
|
+
get start() {
|
|
1490
|
+
try {
|
|
1491
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1492
|
+
wasm.__wbg_get_range_start(retptr, this.__wbg_ptr);
|
|
1493
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1494
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1495
|
+
return r0 === 0 ? void 0 : r1 >>> 0;
|
|
1496
|
+
} finally {
|
|
1497
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
/**
|
|
1501
|
+
* @param {number | undefined} [arg0]
|
|
1502
|
+
*/
|
|
1503
|
+
set start(arg0) {
|
|
1504
|
+
wasm.__wbg_set_range_start(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? 0 : arg0);
|
|
1505
|
+
}
|
|
1506
|
+
/**
|
|
1507
|
+
* @returns {number | undefined}
|
|
1508
|
+
*/
|
|
1509
|
+
get end() {
|
|
1510
|
+
try {
|
|
1511
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1512
|
+
wasm.__wbg_get_range_end(retptr, this.__wbg_ptr);
|
|
1513
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1514
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1515
|
+
return r0 === 0 ? void 0 : r1 >>> 0;
|
|
1516
|
+
} finally {
|
|
1517
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
/**
|
|
1521
|
+
* @param {number | undefined} [arg0]
|
|
1522
|
+
*/
|
|
1523
|
+
set end(arg0) {
|
|
1524
|
+
wasm.__wbg_set_range_end(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? 0 : arg0);
|
|
1525
|
+
}
|
|
1526
|
+
/**
|
|
1527
|
+
* Creates a new formatting range from the given start and end point.
|
|
1528
|
+
* All content within these boundaries (inclusive) will be formatted.
|
|
1529
|
+
* @param {number | undefined} [start]
|
|
1530
|
+
* @param {number | undefined} [end]
|
|
1531
|
+
* @returns {Range}
|
|
1532
|
+
*/
|
|
1533
|
+
static from_values(start, end) {
|
|
1534
|
+
const ret = wasm.range_from_values(!isLikeNone(start), isLikeNone(start) ? 0 : start, !isLikeNone(end), isLikeNone(end) ? 0 : end);
|
|
1535
|
+
return _Range.__wrap(ret);
|
|
1536
|
+
}
|
|
1537
|
+
};
|
|
1538
|
+
var SortRequiresConfig = class _SortRequiresConfig {
|
|
1539
|
+
static __wrap(ptr) {
|
|
1540
|
+
ptr = ptr >>> 0;
|
|
1541
|
+
const obj = Object.create(_SortRequiresConfig.prototype);
|
|
1542
|
+
obj.__wbg_ptr = ptr;
|
|
1543
|
+
return obj;
|
|
1544
|
+
}
|
|
1545
|
+
__destroy_into_raw() {
|
|
1546
|
+
const ptr = this.__wbg_ptr;
|
|
1547
|
+
this.__wbg_ptr = 0;
|
|
1548
|
+
return ptr;
|
|
1549
|
+
}
|
|
1550
|
+
free() {
|
|
1551
|
+
const ptr = this.__destroy_into_raw();
|
|
1552
|
+
wasm.__wbg_sortrequiresconfig_free(ptr);
|
|
1553
|
+
}
|
|
1554
|
+
/**
|
|
1555
|
+
* Whether the sort requires codemod is enabled
|
|
1556
|
+
* @returns {boolean}
|
|
1557
|
+
*/
|
|
1558
|
+
get enabled() {
|
|
1559
|
+
const ret = wasm.__wbg_get_sortrequiresconfig_enabled(this.__wbg_ptr);
|
|
1560
|
+
return ret !== 0;
|
|
1561
|
+
}
|
|
1562
|
+
/**
|
|
1563
|
+
* Whether the sort requires codemod is enabled
|
|
1564
|
+
* @param {boolean} arg0
|
|
1565
|
+
*/
|
|
1566
|
+
set enabled(arg0) {
|
|
1567
|
+
wasm.__wbg_set_sortrequiresconfig_enabled(this.__wbg_ptr, arg0);
|
|
1568
|
+
}
|
|
1569
|
+
/**
|
|
1570
|
+
* @returns {SortRequiresConfig}
|
|
1571
|
+
*/
|
|
1572
|
+
static new() {
|
|
1573
|
+
const ret = wasm.sortrequiresconfig_new();
|
|
1574
|
+
return _SortRequiresConfig.__wrap(ret);
|
|
1575
|
+
}
|
|
1576
|
+
/**
|
|
1577
|
+
* @param {boolean} enabled
|
|
1578
|
+
* @returns {SortRequiresConfig}
|
|
1579
|
+
*/
|
|
1580
|
+
set_enabled(enabled) {
|
|
1581
|
+
const ret = wasm.sortrequiresconfig_set_enabled(this.__wbg_ptr, enabled);
|
|
1582
|
+
return _SortRequiresConfig.__wrap(ret);
|
|
1583
|
+
}
|
|
1584
|
+
};
|
|
1585
|
+
async function __wbg_load(module, imports) {
|
|
1586
|
+
if (typeof Response === "function" && module instanceof Response) {
|
|
1587
|
+
if (typeof WebAssembly.instantiateStreaming === "function") {
|
|
1588
|
+
try {
|
|
1589
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
1590
|
+
} catch (e) {
|
|
1591
|
+
if (module.headers.get("Content-Type") != "application/wasm") {
|
|
1592
|
+
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
1593
|
+
} else {
|
|
1594
|
+
throw e;
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
const bytes = await module.arrayBuffer();
|
|
1599
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
1600
|
+
} else {
|
|
1601
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
1602
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
1603
|
+
return { instance, module };
|
|
1604
|
+
} else {
|
|
1605
|
+
return instance;
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
function __wbg_get_imports() {
|
|
1610
|
+
const imports = {};
|
|
1611
|
+
imports.wbg = {};
|
|
1612
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
1613
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
1614
|
+
return addHeapObject(ret);
|
|
1615
|
+
};
|
|
1616
|
+
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
1617
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1618
|
+
};
|
|
1619
|
+
return imports;
|
|
1620
|
+
}
|
|
1621
|
+
function __wbg_init_memory(imports, maybe_memory) {
|
|
1622
|
+
}
|
|
1623
|
+
function __wbg_finalize_init(instance, module) {
|
|
1624
|
+
wasm = instance.exports;
|
|
1625
|
+
__wbg_init.__wbindgen_wasm_module = module;
|
|
1626
|
+
cachedInt32Memory0 = null;
|
|
1627
|
+
cachedUint8Memory0 = null;
|
|
1628
|
+
return wasm;
|
|
1629
|
+
}
|
|
1630
|
+
function initSync(module) {
|
|
1631
|
+
if (wasm !== void 0) return wasm;
|
|
1632
|
+
const imports = __wbg_get_imports();
|
|
1633
|
+
__wbg_init_memory(imports);
|
|
1634
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
1635
|
+
module = new WebAssembly.Module(module);
|
|
1636
|
+
}
|
|
1637
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
1638
|
+
return __wbg_finalize_init(instance, module);
|
|
1639
|
+
}
|
|
1640
|
+
async function __wbg_init(input) {
|
|
1641
|
+
if (wasm !== void 0) return wasm;
|
|
1642
|
+
if (typeof input === "undefined") {
|
|
1643
|
+
input = new URL("stylua_lib_bg.wasm", import.meta.url);
|
|
1644
|
+
}
|
|
1645
|
+
const imports = __wbg_get_imports();
|
|
1646
|
+
if (typeof input === "string" || typeof Request === "function" && input instanceof Request || typeof URL === "function" && input instanceof URL) {
|
|
1647
|
+
input = fetch(input);
|
|
1648
|
+
}
|
|
1649
|
+
__wbg_init_memory(imports);
|
|
1650
|
+
const { instance, module } = await __wbg_load(await input, imports);
|
|
1651
|
+
return __wbg_finalize_init(instance, module);
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
// node_modules/.pnpm/@johnnymorganz+stylua@2.1.0/node_modules/@johnnymorganz/stylua/stylua_lib.mjs
|
|
1655
|
+
var wasm2 = new URL("./stylua.web/stylua_lib_bg.wasm", import.meta.url);
|
|
1656
|
+
initSync(fs.readFileSync(wasm2));
|
|
1657
|
+
|
|
1658
|
+
// node_modules/.pnpm/eslint-formatting-reporter@0.0.0_eslint@9.25.1_jiti@2.4.2_/node_modules/eslint-formatting-reporter/dist/index.mjs
|
|
1659
|
+
init_esm_shims();
|
|
1660
|
+
var import_prettier_linter_helpers = __toESM(require_prettier_linter_helpers(), 1);
|
|
1661
|
+
var { INSERT, DELETE, REPLACE } = import_prettier_linter_helpers.generateDifferences;
|
|
1662
|
+
var messages = {
|
|
1663
|
+
[INSERT]: "Insert `{{ insertText }}`",
|
|
1664
|
+
[DELETE]: "Delete `{{ deleteText }}`",
|
|
1665
|
+
[REPLACE]: "Replace `{{ deleteText }}` with `{{ insertText }}`"
|
|
1666
|
+
};
|
|
1667
|
+
function _reportDifference(context, difference, rangeOffset = 0) {
|
|
1668
|
+
const { operation, offset, deleteText = "", insertText = "" } = difference;
|
|
1669
|
+
const range = [
|
|
1670
|
+
offset + rangeOffset,
|
|
1671
|
+
offset + rangeOffset + deleteText.length
|
|
1672
|
+
];
|
|
1673
|
+
const [start, end] = range.map((index2) => context.sourceCode.getLocFromIndex(index2));
|
|
1674
|
+
context.report({
|
|
1675
|
+
messageId: operation,
|
|
1676
|
+
data: {
|
|
1677
|
+
deleteText: (0, import_prettier_linter_helpers.showInvisibles)(deleteText),
|
|
1678
|
+
insertText: (0, import_prettier_linter_helpers.showInvisibles)(insertText)
|
|
1679
|
+
},
|
|
1680
|
+
loc: { start, end },
|
|
1681
|
+
fix: (fixer) => fixer.replaceTextRange(range, insertText)
|
|
1682
|
+
});
|
|
1683
|
+
}
|
|
1684
|
+
function reportDifferences(context, source, formatted, offset = 0) {
|
|
1685
|
+
if (source !== formatted) {
|
|
1686
|
+
const differences = (0, import_prettier_linter_helpers.generateDifferences)(source, formatted);
|
|
1687
|
+
for (const difference of differences)
|
|
1688
|
+
_reportDifference(context, difference, offset);
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
// node_modules/.pnpm/eslint-plugin-format-lua@1.0.0_eslint@9.25.1_jiti@2.4.2_/node_modules/eslint-plugin-format-lua/dist/index.mjs
|
|
1693
|
+
var stylua = {
|
|
1694
|
+
create(context) {
|
|
1695
|
+
const config = Config.new();
|
|
1696
|
+
const range = Range.from_values();
|
|
1697
|
+
return {
|
|
1698
|
+
Program() {
|
|
1699
|
+
const sourceCode = context.sourceCode.text;
|
|
1700
|
+
try {
|
|
1701
|
+
const formatted = formatCode(
|
|
1702
|
+
sourceCode,
|
|
1703
|
+
config,
|
|
1704
|
+
range,
|
|
1705
|
+
OutputVerification.None
|
|
1706
|
+
);
|
|
1707
|
+
reportDifferences(context, sourceCode, formatted);
|
|
1708
|
+
} catch (err) {
|
|
1709
|
+
console.log(err);
|
|
1710
|
+
context.report({
|
|
1711
|
+
loc: {
|
|
1712
|
+
end: { column: 0, line: 1 },
|
|
1713
|
+
start: { column: 0, line: 1 }
|
|
1714
|
+
},
|
|
1715
|
+
message: "Failed to format the code"
|
|
1716
|
+
});
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1719
|
+
};
|
|
1720
|
+
},
|
|
1721
|
+
meta: {
|
|
1722
|
+
docs: {
|
|
1723
|
+
category: "Stylistic",
|
|
1724
|
+
description: "Use stylua to format lua files"
|
|
1725
|
+
},
|
|
1726
|
+
fixable: "whitespace",
|
|
1727
|
+
messages,
|
|
1728
|
+
schema: [
|
|
1729
|
+
{
|
|
1730
|
+
additionalProperties: true,
|
|
1731
|
+
properties: {
|
|
1732
|
+
language: {
|
|
1733
|
+
required: true,
|
|
1734
|
+
type: "string"
|
|
1735
|
+
},
|
|
1736
|
+
languageOptions: {
|
|
1737
|
+
type: "object"
|
|
1738
|
+
}
|
|
1739
|
+
},
|
|
1740
|
+
type: "object"
|
|
1741
|
+
}
|
|
1742
|
+
],
|
|
1743
|
+
type: "layout"
|
|
1744
|
+
}
|
|
1745
|
+
};
|
|
1746
|
+
var parserPlain = {
|
|
1747
|
+
meta: {
|
|
1748
|
+
name: "eslint-parser-plain"
|
|
1749
|
+
},
|
|
1750
|
+
...dist_exports
|
|
1751
|
+
};
|
|
1752
|
+
var index = {
|
|
1753
|
+
parserPlain,
|
|
1754
|
+
rules: {
|
|
1755
|
+
stylua
|
|
1756
|
+
}
|
|
1757
|
+
};
|
|
1758
|
+
export {
|
|
1759
|
+
index as default
|
|
1760
|
+
};
|