eslint-plugin-perfectionist 2.0.1 → 2.2.0

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.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import U from "path";
1
+ import B from "node:path";
2
2
  import { ESLintUtils as ne, ASTUtils as D } from "@typescript-eslint/utils";
3
3
  import { minimatch as $ } from "minimatch";
4
4
  import le from "natural-compare-lite";
5
- import { builtinModules as ie } from "module";
6
- let v = ne.RuleCreator(
5
+ import { builtinModules as ie } from "node:module";
6
+ let O = ne.RuleCreator(
7
7
  (s) => `https://eslint-plugin-perfectionist.azat.io/rules/${s}`
8
8
  ), x = (s, l) => {
9
9
  for (let n = 0, a = s.length; n < a; n++) {
@@ -12,12 +12,12 @@ let v = ne.RuleCreator(
12
12
  return n;
13
13
  }
14
14
  return s.length;
15
- }, w = (s) => {
15
+ }, v = (s) => {
16
16
  let [l, n] = s;
17
17
  return n - l;
18
18
  }, j = (s) => s > 0;
19
19
  var i = /* @__PURE__ */ ((s) => (s.alphabetical = "alphabetical", s["line-length"] = "line-length", s.natural = "natural", s))(i || {}), f = /* @__PURE__ */ ((s) => (s.desc = "desc", s.asc = "asc", s))(f || {});
20
- let G = (s) => {
20
+ let M = (s) => {
21
21
  let l, n = (u) => {
22
22
  !l && s.flat().includes(u) && (l = u);
23
23
  };
@@ -26,11 +26,17 @@ let G = (s) => {
26
26
  setCustomGroups: (u, t) => {
27
27
  if (u)
28
28
  for (let [e, o] of Object.entries(u))
29
- Array.isArray(o) && o.some((r) => $(t, r)) && n(e), typeof o == "string" && $(t, o) && n(e);
29
+ Array.isArray(o) && o.some(
30
+ (r) => $(t, r, {
31
+ nocomment: !0
32
+ })
33
+ ) && n(e), typeof o == "string" && $(t, o, {
34
+ nocomment: !0
35
+ }) && n(e);
30
36
  },
31
37
  defineGroup: n
32
38
  };
33
- }, I = (s, l, n) => {
39
+ }, w = (s, l, n) => {
34
40
  var e, o;
35
41
  if ((e = l.dependencies) != null && e.includes(s.name))
36
42
  return -1;
@@ -38,20 +44,26 @@ let G = (s) => {
38
44
  return 1;
39
45
  let a = n.order === "asc" ? 1 : -1, u, t = (r) => n["ignore-case"] ? r.toLowerCase() : r;
40
46
  return n.type === i.alphabetical ? u = (r, c) => t(r.name).localeCompare(t(c.name)) : n.type === i.natural ? u = (r, c) => le(t(r.name), t(c.name)) : u = (r, c) => r.size - c.size, a * u(s, l);
41
- }, N = (s, l) => [...s].sort((n, a) => I(n, a, l)), pe = (s, l) => {
47
+ }, A = (s, l) => [...s].sort((n, a) => w(n, a, l)), pe = (s, l) => {
42
48
  let n = l.getTokenAfter(s, {
43
49
  filter: ({ value: a, type: u }) => !(u === "Punctuator" && [",", ";"].includes(a)),
44
50
  includeComments: !0
45
51
  });
46
52
  return ((n == null ? void 0 : n.type) === "Block" || (n == null ? void 0 : n.type) === "Line") && s.loc.end.line === n.loc.end.line ? n : null;
47
- }, oe = (s, l) => Array.isArray(s) && s.some((n) => $(l.trim(), n)) || typeof s == "string" && $(l.trim(), s) || s === !0, _ = (s, l) => {
53
+ }, oe = (s, l) => Array.isArray(s) && s.some(
54
+ (n) => $(l.trim(), n, {
55
+ nocomment: !0
56
+ })
57
+ ) || typeof s == "string" && $(l.trim(), s, {
58
+ nocomment: !0
59
+ }) || s === !0, _ = (s, l) => {
48
60
  let [n, a] = l.getTokensBefore(s, {
49
61
  filter: ({ value: u, type: t }) => !(t === "Punctuator" && [",", ";"].includes(u)),
50
62
  includeComments: !0,
51
63
  count: 2
52
64
  });
53
65
  return ((a == null ? void 0 : a.type) === "Block" || (a == null ? void 0 : a.type) === "Line") && s.loc.start.line - a.loc.end.line <= 1 && (n == null ? void 0 : n.loc.end.line) !== a.loc.start.line ? a : null;
54
- }, L = (s, l, n) => {
66
+ }, G = (s, l, n) => {
55
67
  var o;
56
68
  let a = s.range.at(0), u = s.range.at(1), t = l.text.slice(a, u);
57
69
  if (D.isParenthesized(s, l)) {
@@ -83,9 +95,9 @@ let G = (s) => {
83
95
  let { node: y } = l.at(c);
84
96
  t.push(
85
97
  s.replaceTextRange(
86
- L(y, a, u),
98
+ G(y, a, u),
87
99
  a.text.slice(
88
- ...L(n.at(c).node, a, u)
100
+ ...G(n.at(c).node, a, u)
89
101
  )
90
102
  )
91
103
  );
@@ -113,8 +125,8 @@ let G = (s) => {
113
125
  a && u && l(a, u, n - 1);
114
126
  }
115
127
  };
116
- const V = "sort-svelte-attributes", ue = v({
117
- name: V,
128
+ const W = "sort-svelte-attributes", ue = O({
129
+ name: W,
118
130
  meta: {
119
131
  type: "suggestion",
120
132
  docs: {
@@ -163,7 +175,7 @@ const V = "sort-svelte-attributes", ue = v({
163
175
  order: f.asc
164
176
  }
165
177
  ],
166
- create: (s) => U.extname(s.getFilename()) !== ".svelte" ? {} : {
178
+ create: (s) => B.extname(s.getFilename()) !== ".svelte" ? {} : {
167
179
  SvelteStartTag: (l) => {
168
180
  if (l.attributes.length > 1) {
169
181
  let n = k(s.options.at(0), {
@@ -176,11 +188,11 @@ const V = "sort-svelte-attributes", ue = v({
176
188
  (t, e) => {
177
189
  if (e.type === "SvelteSpreadAttribute")
178
190
  return t.push([]), t;
179
- let o, { getGroup: r, defineGroup: c, setCustomGroups: d } = G(
191
+ let o, { getGroup: r, defineGroup: c, setCustomGroups: d } = M(
180
192
  n.groups
181
193
  );
182
194
  return e.key.type === "SvelteSpecialDirectiveKey" ? o = a.text.slice(...e.key.range) : typeof e.key.name == "string" ? { name: o } = e.key : o = a.text.slice(...e.key.range), d(n["custom-groups"], o), e.type === "SvelteShorthandAttribute" && (c("svelte-shorthand"), c("shorthand")), (!("value" in e) || Array.isArray(e.value) && !e.value.at(0)) && c("shorthand"), e.loc.start.line !== e.loc.end.line && c("multiline"), t.at(-1).push({
183
- size: w(e.range),
195
+ size: v(e.range),
184
196
  node: e,
185
197
  group: r(),
186
198
  name: o
@@ -191,7 +203,7 @@ const V = "sort-svelte-attributes", ue = v({
191
203
  for (let t of u)
192
204
  C(t, (e, o) => {
193
205
  let r = x(n.groups, e), c = x(n.groups, o);
194
- (r > c || r === c && j(I(e, o, n))) && s.report({
206
+ (r > c || r === c && j(w(e, o, n))) && s.report({
195
207
  messageId: "unexpectedSvelteAttributesOrder",
196
208
  data: {
197
209
  left: e.name,
@@ -202,14 +214,14 @@ const V = "sort-svelte-attributes", ue = v({
202
214
  let y = {};
203
215
  for (let g of t) {
204
216
  let p = x(n.groups, g);
205
- p in y ? y[p] = N(
217
+ p in y ? y[p] = A(
206
218
  [...y[p], g],
207
219
  n
208
220
  ) : y[p] = [g];
209
221
  }
210
222
  let m = [];
211
223
  for (let g of Object.keys(y).sort())
212
- m.push(...N(y[g], n));
224
+ m.push(...A(y[g], n));
213
225
  return P(d, t, m, a);
214
226
  }
215
227
  });
@@ -217,8 +229,8 @@ const V = "sort-svelte-attributes", ue = v({
217
229
  }
218
230
  }
219
231
  }
220
- }), W = "sort-astro-attributes", ce = v({
221
- name: W,
232
+ }), V = "sort-astro-attributes", ce = O({
233
+ name: V,
222
234
  meta: {
223
235
  type: "suggestion",
224
236
  docs: {
@@ -268,7 +280,7 @@ const V = "sort-svelte-attributes", ue = v({
268
280
  }
269
281
  ],
270
282
  // @ts-ignore
271
- create: (s) => U.extname(s.getFilename()) !== ".astro" ? {} : {
283
+ create: (s) => B.extname(s.getFilename()) !== ".astro" ? {} : {
272
284
  JSXElement: (l) => {
273
285
  let { attributes: n } = l.openingElement;
274
286
  if (n.length > 1) {
@@ -282,11 +294,11 @@ const V = "sort-svelte-attributes", ue = v({
282
294
  (e, o) => {
283
295
  if (o.type === "JSXSpreadAttribute")
284
296
  return e.push([]), e;
285
- let r = typeof o.name.name == "string" ? o.name.name : u.text.slice(...o.name.range), { getGroup: c, defineGroup: d, setCustomGroups: y } = G(
297
+ let r = typeof o.name.name == "string" ? o.name.name : u.text.slice(...o.name.range), { getGroup: c, defineGroup: d, setCustomGroups: y } = M(
286
298
  a.groups
287
299
  );
288
300
  return y(a["custom-groups"], r), o.type === "AstroShorthandAttribute" && (d("astro-shorthand"), d("shorthand")), o.value === null && d("shorthand"), o.loc.start.line !== o.loc.end.line && d("multiline"), e.at(-1).push({
289
- size: w(o.range),
301
+ size: v(o.range),
290
302
  node: o,
291
303
  group: c(),
292
304
  name: r
@@ -297,7 +309,7 @@ const V = "sort-svelte-attributes", ue = v({
297
309
  for (let e of t)
298
310
  C(e, (o, r) => {
299
311
  let c = x(a.groups, o), d = x(a.groups, r);
300
- (c > d || c === d && j(I(o, r, a))) && s.report({
312
+ (c > d || c === d && j(w(o, r, a))) && s.report({
301
313
  messageId: "unexpectedAstroAttributesOrder",
302
314
  data: {
303
315
  left: o.name,
@@ -308,14 +320,14 @@ const V = "sort-svelte-attributes", ue = v({
308
320
  let m = {};
309
321
  for (let p of e) {
310
322
  let h = x(a.groups, p);
311
- h in m ? m[h] = N(
323
+ h in m ? m[h] = A(
312
324
  [...m[h], p],
313
325
  a
314
326
  ) : m[h] = [p];
315
327
  }
316
328
  let g = [];
317
329
  for (let p of Object.keys(m).sort())
318
- g.push(...N(m[p], a));
330
+ g.push(...A(m[p], a));
319
331
  return P(y, e, g, u);
320
332
  }
321
333
  });
@@ -324,8 +336,8 @@ const V = "sort-svelte-attributes", ue = v({
324
336
  }
325
337
  }
326
338
  });
327
- let O = (s) => s.replaceAll(/\s\s+/g, " ").trim();
328
- const J = "sort-array-includes", de = v({
339
+ let I = (s) => s.replaceAll(/\s\s+/g, " ").trim();
340
+ const J = "sort-array-includes", de = O({
329
341
  name: J,
330
342
  meta: {
331
343
  type: "suggestion",
@@ -386,7 +398,7 @@ const J = "sort-array-includes", de = v({
386
398
  }), u = s.getSourceCode(), t = n.reduce(
387
399
  (e, o) => (o !== null && e.at(0).push({
388
400
  name: o.type === "Literal" ? `${o.value}` : u.text.slice(...o.range),
389
- size: w(o.range),
401
+ size: v(o.range),
390
402
  type: o.type,
391
403
  node: o
392
404
  }), e),
@@ -394,15 +406,15 @@ const J = "sort-array-includes", de = v({
394
406
  ).flat();
395
407
  C(t, (e, o) => {
396
408
  let r;
397
- a["spread-last"] && e.node.type === "Literal" && o.node.type === "SpreadElement" ? r = !1 : a["spread-last"] && e.node.type === "SpreadElement" && o.node.type === "Literal" ? r = !0 : r = j(I(e, o, a)), r && s.report({
409
+ a["spread-last"] && e.node.type === "Literal" && o.node.type === "SpreadElement" ? r = !1 : a["spread-last"] && e.node.type === "SpreadElement" && o.node.type === "Literal" ? r = !0 : r = j(w(e, o, a)), r && s.report({
398
410
  messageId: "unexpectedArrayIncludesOrder",
399
411
  data: {
400
- left: O(e.name),
401
- right: O(o.name)
412
+ left: I(e.name),
413
+ right: I(o.name)
402
414
  },
403
415
  node: o.node,
404
416
  fix: (c) => {
405
- let d = N(t, a);
417
+ let d = A(t, a);
406
418
  if (a["spread-last"])
407
419
  for (let y = 0, m = d.length; y < m; y++)
408
420
  d.at(y).node.type === "SpreadElement" && d.push(d.splice(y, 1).at(0));
@@ -414,7 +426,7 @@ const J = "sort-array-includes", de = v({
414
426
  }
415
427
  }
416
428
  })
417
- }), X = "sort-vue-attributes", fe = v({
429
+ }), X = "sort-vue-attributes", fe = O({
418
430
  name: X,
419
431
  meta: {
420
432
  type: "suggestion",
@@ -466,7 +478,7 @@ const J = "sort-array-includes", de = v({
466
478
  }
467
479
  ],
468
480
  create: (s) => {
469
- if (U.extname(s.getFilename()) !== ".vue")
481
+ if (B.extname(s.getFilename()) !== ".vue")
470
482
  return {};
471
483
  if (!("defineTemplateBodyVisitor" in s.parserServices))
472
484
  return {};
@@ -484,11 +496,11 @@ const J = "sort-array-includes", de = v({
484
496
  (e, o) => {
485
497
  if (o.key.type === "VDirectiveKey" && o.key.name.rawName === "bind")
486
498
  return e.push([]), e;
487
- let r, { getGroup: c, defineGroup: d, setCustomGroups: y } = G(
499
+ let r, { getGroup: c, defineGroup: d, setCustomGroups: y } = M(
488
500
  a.groups
489
501
  );
490
502
  return typeof o.key.name == "string" && o.key.type !== "VDirectiveKey" ? r = o.key.rawName : r = u.text.slice(...o.key.range), y(a["custom-groups"], r), o.value === null && d("shorthand"), o.loc.start.line !== o.loc.end.line && d("multiline"), e.at(-1).push({
491
- size: w(o.range),
503
+ size: v(o.range),
492
504
  node: o,
493
505
  group: c(),
494
506
  name: r
@@ -499,7 +511,7 @@ const J = "sort-array-includes", de = v({
499
511
  for (let e of t)
500
512
  C(e, (o, r) => {
501
513
  let c = x(a.groups, o), d = x(a.groups, r);
502
- (c > d || c === d && j(I(o, r, a))) && s.report({
514
+ (c > d || c === d && j(w(o, r, a))) && s.report({
503
515
  messageId: "unexpectedVueAttributesOrder",
504
516
  data: {
505
517
  left: o.name,
@@ -510,14 +522,14 @@ const J = "sort-array-includes", de = v({
510
522
  let m = {};
511
523
  for (let p of e) {
512
524
  let h = x(a.groups, p);
513
- h in m ? m[h] = N(
525
+ h in m ? m[h] = A(
514
526
  [...m[h], p],
515
527
  a
516
528
  ) : m[h] = [p];
517
529
  }
518
530
  let g = [];
519
531
  for (let p of Object.keys(m).sort())
520
- g.push(...N(m[p], a));
532
+ g.push(...A(m[p], a));
521
533
  return P(y, e, g, u);
522
534
  }
523
535
  });
@@ -526,7 +538,7 @@ const J = "sort-array-includes", de = v({
526
538
  }
527
539
  });
528
540
  }
529
- }), K = "sort-named-exports", ge = v({
541
+ }), K = "sort-named-exports", ge = O({
530
542
  name: K,
531
543
  meta: {
532
544
  type: "suggestion",
@@ -578,25 +590,25 @@ const J = "sort-array-includes", de = v({
578
590
  "ignore-case": !1,
579
591
  order: f.asc
580
592
  }), a = s.getSourceCode(), u = l.specifiers.map((t) => ({
581
- size: w(t.range),
593
+ size: v(t.range),
582
594
  name: t.local.name,
583
595
  node: t
584
596
  }));
585
597
  C(u, (t, e) => {
586
- j(I(t, e, n)) && s.report({
598
+ j(w(t, e, n)) && s.report({
587
599
  messageId: "unexpectedNamedExportsOrder",
588
600
  data: {
589
601
  left: t.name,
590
602
  right: e.name
591
603
  },
592
604
  node: e.node,
593
- fix: (o) => P(o, u, N(u, n), a)
605
+ fix: (o) => P(o, u, A(u, n), a)
594
606
  });
595
607
  });
596
608
  }
597
609
  }
598
610
  })
599
- }), q = "sort-named-imports", ye = v({
611
+ }), q = "sort-named-imports", ye = O({
600
612
  name: q,
601
613
  meta: {
602
614
  type: "suggestion",
@@ -625,6 +637,10 @@ const J = "sort-array-includes", de = v({
625
637
  "ignore-case": {
626
638
  type: "boolean",
627
639
  default: !1
640
+ },
641
+ "ignore-alias": {
642
+ type: "boolean",
643
+ default: !1
628
644
  }
629
645
  },
630
646
  additionalProperties: !1
@@ -648,28 +664,32 @@ const J = "sort-array-includes", de = v({
648
664
  if (n.length > 1) {
649
665
  let a = k(s.options.at(0), {
650
666
  type: i.alphabetical,
667
+ "ignore-alias": !0,
651
668
  "ignore-case": !1,
652
669
  order: f.asc
653
- }), u = s.getSourceCode(), t = n.map((e) => ({
654
- size: w(e.range),
655
- name: e.local.name,
656
- node: e
657
- }));
670
+ }), u = s.getSourceCode(), t = n.map((e) => {
671
+ let { name: o } = e.local;
672
+ return a["ignore-alias"] && e.type === "ImportSpecifier" && ({ name: o } = e.imported), {
673
+ size: v(e.range),
674
+ node: e,
675
+ name: o
676
+ };
677
+ });
658
678
  C(t, (e, o) => {
659
- j(I(e, o, a)) && s.report({
679
+ j(w(e, o, a)) && s.report({
660
680
  messageId: "unexpectedNamedImportsOrder",
661
681
  data: {
662
682
  left: e.name,
663
683
  right: o.name
664
684
  },
665
685
  node: o.node,
666
- fix: (r) => P(r, t, N(t, a), u)
686
+ fix: (r) => P(r, t, A(t, a), u)
667
687
  });
668
688
  });
669
689
  }
670
690
  }
671
691
  })
672
- }), F = "sort-object-types", me = v({
692
+ }), F = "sort-object-types", me = O({
673
693
  name: F,
674
694
  meta: {
675
695
  type: "suggestion",
@@ -731,7 +751,7 @@ const J = "sort-array-includes", de = v({
731
751
  groups: []
732
752
  }), a = s.getSourceCode(), u = l.members.map((t) => {
733
753
  var p, h;
734
- let e, o = a.text.slice(t.range.at(0), t.range.at(1)), { getGroup: r, defineGroup: c, setCustomGroups: d } = G(
754
+ let e, o = a.text.slice(t.range.at(0), t.range.at(1)), { getGroup: r, defineGroup: c, setCustomGroups: d } = M(
735
755
  n.groups
736
756
  ), y = (S) => S.replace(/(,|;)$/, "");
737
757
  if (t.type === "TSPropertySignature")
@@ -749,7 +769,7 @@ const J = "sort-array-includes", de = v({
749
769
  d(n["custom-groups"], e), t.loc.start.line !== t.loc.end.line && c("multiline");
750
770
  let g = o.endsWith(";") || o.endsWith(",") ? 1 : 0;
751
771
  return {
752
- size: w(t.range) - g,
772
+ size: v(t.range) - g,
753
773
  group: r(),
754
774
  node: t,
755
775
  name: e
@@ -757,25 +777,25 @@ const J = "sort-array-includes", de = v({
757
777
  });
758
778
  C(u, (t, e) => {
759
779
  let o = x(n.groups, t), r = x(n.groups, e);
760
- (o > r || o === r && j(I(t, e, n))) && s.report({
780
+ (o > r || o === r && j(w(t, e, n))) && s.report({
761
781
  messageId: "unexpectedObjectTypesOrder",
762
782
  data: {
763
- left: O(t.name),
764
- right: O(e.name)
783
+ left: I(t.name),
784
+ right: I(e.name)
765
785
  },
766
786
  node: e.node,
767
787
  fix: (c) => {
768
788
  let d = {};
769
789
  for (let m of u) {
770
790
  let g = x(n.groups, m);
771
- g in d ? d[g] = N(
791
+ g in d ? d[g] = A(
772
792
  [...d[g], m],
773
793
  n
774
794
  ) : d[g] = [m];
775
795
  }
776
796
  let y = [];
777
797
  for (let m of Object.keys(d).sort())
778
- y.push(...N(d[m], n));
798
+ y.push(...A(d[m], n));
779
799
  return P(c, u, y, a);
780
800
  }
781
801
  });
@@ -783,7 +803,7 @@ const J = "sort-array-includes", de = v({
783
803
  }
784
804
  }
785
805
  })
786
- }), H = "sort-union-types", he = v({
806
+ }), H = "sort-union-types", he = O({
787
807
  name: H,
788
808
  meta: {
789
809
  type: "suggestion",
@@ -841,16 +861,16 @@ const J = "sort-array-includes", de = v({
841
861
  }), u = l.types.map((t) => ({
842
862
  group: t.type === "TSNullKeyword" || t.type === "TSUndefinedKeyword" ? "nullable" : "unknown",
843
863
  name: n.text.slice(...t.range),
844
- size: w(t.range),
864
+ size: v(t.range),
845
865
  node: t
846
866
  }));
847
867
  C(u, (t, e) => {
848
- let o = j(I(t, e, a));
868
+ let o = j(w(t, e, a));
849
869
  a["nullable-last"] && (t.group === "nullable" && e.group === "unknown" ? o = !0 : t.group === "unknown" && e.group === "nullable" && (o = !1)), o && s.report({
850
870
  messageId: "unexpectedUnionTypesOrder",
851
871
  data: {
852
- left: O(t.name),
853
- right: O(e.name)
872
+ left: I(t.name),
873
+ right: I(e.name)
854
874
  },
855
875
  node: e.node,
856
876
  fix: (r) => {
@@ -858,18 +878,18 @@ const J = "sort-array-includes", de = v({
858
878
  if (a["nullable-last"]) {
859
879
  let d = [], y = u.filter((m) => m.group === "nullable" ? (d.push(m), !1) : !0);
860
880
  c = [
861
- ...N(y, a),
862
- ...N(d, a)
881
+ ...A(y, a),
882
+ ...A(d, a)
863
883
  ];
864
884
  } else
865
- c = N(u, a);
885
+ c = A(u, a);
866
886
  return P(r, u, c, n);
867
887
  }
868
888
  });
869
889
  });
870
890
  }
871
891
  })
872
- }), Q = "sort-interfaces", be = v({
892
+ }), Q = "sort-interfaces", be = O({
873
893
  name: Q,
874
894
  meta: {
875
895
  type: "suggestion",
@@ -938,14 +958,16 @@ const J = "sort-array-includes", de = v({
938
958
  groups: []
939
959
  });
940
960
  if (!n["ignore-pattern"].some(
941
- (a) => $(l.id.name, a)
961
+ (a) => $(l.id.name, a, {
962
+ nocomment: !0
963
+ })
942
964
  )) {
943
965
  let a = s.getSourceCode(), u = l.body.body.reduce(
944
966
  (t, e) => {
945
967
  var y, m, g;
946
968
  if (e.type === "TSCallSignatureDeclaration")
947
969
  return t.push([]), t;
948
- let o, { getGroup: r, defineGroup: c, setCustomGroups: d } = G(
970
+ let o, { getGroup: r, defineGroup: c, setCustomGroups: d } = M(
949
971
  n.groups
950
972
  );
951
973
  if (e.type === "TSPropertySignature")
@@ -965,7 +987,7 @@ const J = "sort-array-includes", de = v({
965
987
  o = a.text.slice(e.range.at(0), p);
966
988
  }
967
989
  return d(n["custom-groups"], o), e.loc.start.line !== e.loc.end.line && c("multiline"), t.at(-1).push({
968
- size: w(e.range),
990
+ size: v(e.range),
969
991
  group: r(),
970
992
  node: e,
971
993
  name: o
@@ -976,25 +998,25 @@ const J = "sort-array-includes", de = v({
976
998
  for (let t of u)
977
999
  C(t, (e, o) => {
978
1000
  let r = x(n.groups, e), c = x(n.groups, o);
979
- (r > c || r === c && j(I(e, o, n))) && s.report({
1001
+ (r > c || r === c && j(w(e, o, n))) && s.report({
980
1002
  messageId: "unexpectedInterfacePropertiesOrder",
981
1003
  data: {
982
- left: O(e.name),
983
- right: O(o.name)
1004
+ left: I(e.name),
1005
+ right: I(o.name)
984
1006
  },
985
1007
  node: o.node,
986
1008
  fix: (d) => {
987
1009
  let y = {};
988
1010
  for (let g of t) {
989
1011
  let p = x(n.groups, g);
990
- p in y ? y[p] = N(
1012
+ p in y ? y[p] = A(
991
1013
  [...y[p], g],
992
1014
  n
993
1015
  ) : y[p] = [g];
994
1016
  }
995
1017
  let m = [];
996
1018
  for (let g of Object.keys(y).sort())
997
- m.push(...N(y[g], n));
1019
+ m.push(...A(y[g], n));
998
1020
  return P(d, t, m, a);
999
1021
  }
1000
1022
  });
@@ -1003,7 +1025,7 @@ const J = "sort-array-includes", de = v({
1003
1025
  }
1004
1026
  }
1005
1027
  })
1006
- }), Y = "sort-jsx-props", xe = v({
1028
+ }), Y = "sort-jsx-props", xe = O({
1007
1029
  name: Y,
1008
1030
  meta: {
1009
1031
  type: "suggestion",
@@ -1054,7 +1076,7 @@ const J = "sort-array-includes", de = v({
1054
1076
  }
1055
1077
  ],
1056
1078
  create: (s) => [".svelte", ".astro", ".vue"].includes(
1057
- U.extname(s.getFilename())
1079
+ B.extname(s.getFilename())
1058
1080
  ) ? {} : {
1059
1081
  JSXElement: (l) => {
1060
1082
  if (l.openingElement.attributes.length > 1) {
@@ -1068,12 +1090,12 @@ const J = "sort-array-includes", de = v({
1068
1090
  (t, e) => {
1069
1091
  if (e.type === "JSXSpreadAttribute")
1070
1092
  return t.push([]), t;
1071
- let o = e.name.type === "JSXNamespacedName" ? `${e.name.namespace.name}:${e.name.name.name}` : e.name.name, { getGroup: r, defineGroup: c, setCustomGroups: d } = G(
1093
+ let o = e.name.type === "JSXNamespacedName" ? `${e.name.namespace.name}:${e.name.name.name}` : e.name.name, { getGroup: r, defineGroup: c, setCustomGroups: d } = M(
1072
1094
  n.groups
1073
1095
  );
1074
1096
  d(n["custom-groups"], o), e.value === null && c("shorthand"), e.loc.start.line !== e.loc.end.line && c("multiline");
1075
1097
  let y = {
1076
- size: w(e.range),
1098
+ size: v(e.range),
1077
1099
  group: r(),
1078
1100
  node: e,
1079
1101
  name: o
@@ -1085,7 +1107,7 @@ const J = "sort-array-includes", de = v({
1085
1107
  for (let t of u)
1086
1108
  C(t, (e, o) => {
1087
1109
  let r = x(n.groups, e), c = x(n.groups, o);
1088
- (r > c || r === c && j(I(e, o, n))) && s.report({
1110
+ (r > c || r === c && j(w(e, o, n))) && s.report({
1089
1111
  messageId: "unexpectedJSXPropsOrder",
1090
1112
  data: {
1091
1113
  left: e.name,
@@ -1096,14 +1118,14 @@ const J = "sort-array-includes", de = v({
1096
1118
  let y = {};
1097
1119
  for (let g of t) {
1098
1120
  let p = x(n.groups, g);
1099
- p in y ? y[p] = N(
1121
+ p in y ? y[p] = A(
1100
1122
  [...y[p], g],
1101
1123
  n
1102
1124
  ) : y[p] = [g];
1103
1125
  }
1104
1126
  let m = [];
1105
1127
  for (let g of Object.keys(y).sort())
1106
- m.push(...N(y[g], n));
1128
+ m.push(...A(y[g], n));
1107
1129
  return P(d, t, m, a);
1108
1130
  }
1109
1131
  });
@@ -1111,7 +1133,7 @@ const J = "sort-array-includes", de = v({
1111
1133
  }
1112
1134
  }
1113
1135
  }
1114
- }), Z = "sort-exports", Ee = v({
1136
+ }), Z = "sort-exports", Ee = O({
1115
1137
  name: Z,
1116
1138
  meta: {
1117
1139
  type: "suggestion",
@@ -1162,7 +1184,7 @@ const J = "sort-array-includes", de = v({
1162
1184
  "ignore-case": !1
1163
1185
  }), n = [[]], a = (u) => {
1164
1186
  u.type === "ExportAllDeclaration" && u.exported === null ? n.push([]) : n.at(-1).push({
1165
- size: w(u.range),
1187
+ size: v(u.range),
1166
1188
  name: u.source.value,
1167
1189
  node: u
1168
1190
  });
@@ -1176,20 +1198,20 @@ const J = "sort-array-includes", de = v({
1176
1198
  let u = s.getSourceCode();
1177
1199
  for (let t of n)
1178
1200
  C(t, (e, o) => {
1179
- j(I(e, o, l)) && s.report({
1201
+ j(w(e, o, l)) && s.report({
1180
1202
  messageId: "unexpectedExportsOrder",
1181
1203
  data: {
1182
1204
  left: e.name,
1183
1205
  right: o.name
1184
1206
  },
1185
1207
  node: o.node,
1186
- fix: (r) => P(r, t, N(t, l), u)
1208
+ fix: (r) => P(r, t, A(t, l), u)
1187
1209
  });
1188
1210
  });
1189
1211
  }
1190
1212
  };
1191
1213
  }
1192
- }), ee = "sort-imports", Se = v({
1214
+ }), ee = "sort-imports", Se = O({
1193
1215
  name: ee,
1194
1216
  meta: {
1195
1217
  type: "suggestion",
@@ -1276,9 +1298,17 @@ const J = "sort-array-includes", de = v({
1276
1298
  order: f.asc,
1277
1299
  "ignore-case": !1,
1278
1300
  groups: []
1279
- }), n = [], a = s.getSourceCode(), u = [], t = (r) => r.type === "ImportDeclaration" && r.specifiers.length === 0, e = (r) => {
1301
+ }), n = !1;
1302
+ for (let r of l.groups)
1303
+ if (Array.isArray(r))
1304
+ for (let c of r)
1305
+ c === "unknown" && (n = !0);
1306
+ else
1307
+ r === "unknown" && (n = !0);
1308
+ n || (l.groups = [...l.groups, "unknown"]);
1309
+ let a = s.getSourceCode(), u = [], t = (r) => r.type === "ImportDeclaration" && r.specifiers.length === 0, e = (r) => {
1280
1310
  let c = (b) => [".less", ".scss", ".sass", ".styl", ".pcss", ".css", ".sss"].some(
1281
- (E) => b.endsWith(E)
1311
+ (T) => b.endsWith(T)
1282
1312
  ), d = (b) => [
1283
1313
  "./index.d.js",
1284
1314
  "./index.d.ts",
@@ -1287,16 +1317,31 @@ const J = "sort-array-includes", de = v({
1287
1317
  "./index",
1288
1318
  "./",
1289
1319
  "."
1290
- ].includes(b), y = (b) => b.indexOf("..") === 0, m = (b) => b.indexOf("./") === 0, { getGroup: g, defineGroup: p, setCustomGroups: h } = G(l.groups), S = (b) => l["internal-pattern"].length && l["internal-pattern"].some(
1291
- (E) => $(b.source.value, E)
1292
- ) || n.some((E) => $(b.source.value, E)), A = (b) => ie.includes(
1293
- b.startsWith("node:") ? b.split("node:")[1] : b
1294
- );
1295
- return r.importKind === "type" && (r.type === "ImportDeclaration" && (h(l["custom-groups"].type, r.source.value), A(r.source.value) && p("builtin-type"), S(r) && p("internal-type"), d(r.source.value) && p("index-type"), y(r.source.value) && p("parent-type"), m(r.source.value) && p("sibling-type")), p("external-type"), p("type")), r.type === "ImportDeclaration" && (h(l["custom-groups"].value, r.source.value), A(r.source.value) && p("builtin"), S(r) && p("internal"), c(r.source.value) && p("style"), t(r) && p("side-effect"), d(r.source.value) && p("index"), y(r.source.value) && p("parent"), m(r.source.value) && p("sibling"), p("external")), g();
1320
+ ].includes(b), y = (b) => b.indexOf("..") === 0, m = (b) => b.indexOf("./") === 0, { getGroup: g, defineGroup: p, setCustomGroups: h } = M(l.groups), S = (b) => l["internal-pattern"].length && l["internal-pattern"].some(
1321
+ (T) => $(b.source.value, T, {
1322
+ nocomment: !0
1323
+ })
1324
+ ), N = (b) => {
1325
+ let T = [
1326
+ "bun",
1327
+ "bun:ffi",
1328
+ "bun:jsc",
1329
+ "bun:sqlite",
1330
+ "bun:test",
1331
+ "bun:wrap",
1332
+ "detect-libc",
1333
+ "undici",
1334
+ "ws"
1335
+ ];
1336
+ return ie.includes(
1337
+ b.startsWith("node:") ? b.split("node:")[1] : b
1338
+ ) || T.includes(b);
1339
+ }, E = (b) => !(b.startsWith(".") || b.startsWith("/"));
1340
+ return r.importKind === "type" && (r.type === "ImportDeclaration" && (h(l["custom-groups"].type, r.source.value), d(r.source.value) && p("index-type"), m(r.source.value) && p("sibling-type"), y(r.source.value) && p("parent-type"), S(r) && p("internal-type"), N(r.source.value) && p("builtin-type"), E(r.source.value) && p("external-type")), p("type")), r.type === "ImportDeclaration" && (h(l["custom-groups"].value, r.source.value), t(r) && p("side-effect"), c(r.source.value) && p("style"), d(r.source.value) && p("index"), m(r.source.value) && p("sibling"), y(r.source.value) && p("parent"), S(r) && p("internal"), N(r.source.value) && p("builtin"), E(r.source.value) && p("external")), g();
1296
1341
  }, o = (r) => {
1297
1342
  let c;
1298
1343
  r.type === "ImportDeclaration" ? c = r.source.value : r.moduleReference.type === "TSExternalModuleReference" && r.moduleReference.expression.type === "Literal" ? c = `${r.moduleReference.expression.value}` : c = a.text.slice(...r.moduleReference.range), u.push({
1299
- size: w(r.range),
1344
+ size: v(r.range),
1300
1345
  group: e(r),
1301
1346
  name: c,
1302
1347
  node: r
@@ -1318,53 +1363,53 @@ const J = "sort-array-includes", de = v({
1318
1363
  p.node.loc.start.line - 1
1319
1364
  ).filter((S) => !S.trim().length).length, d = (g, p) => {
1320
1365
  let h = [], S = {};
1321
- for (let b of p) {
1322
- let E = x(l.groups, b);
1323
- E in S ? S[E] = N(
1324
- [...S[E], b],
1366
+ for (let E of p) {
1367
+ let b = x(l.groups, E);
1368
+ b in S ? S[b] = A(
1369
+ [...S[b], E],
1325
1370
  l
1326
- ) : S[E] = [b];
1371
+ ) : S[b] = [E];
1327
1372
  }
1328
- let A = Object.keys(S).sort().reduce(
1329
- (b, E) => [
1330
- ...b,
1331
- ...S[E]
1373
+ let N = Object.keys(S).sort().reduce(
1374
+ (E, b) => [
1375
+ ...E,
1376
+ ...S[b]
1332
1377
  ],
1333
1378
  []
1334
1379
  );
1335
- for (let b = 0, E = A.length; b < E; b++) {
1336
- let M = A.at(b);
1380
+ for (let E = 0, b = N.length; E < b; E++) {
1381
+ let T = N.at(E);
1337
1382
  if (h.push(
1338
1383
  g.replaceTextRange(
1339
- L(p.at(b).node, a),
1340
- a.text.slice(...L(M.node, a))
1384
+ G(p.at(E).node, a),
1385
+ a.text.slice(...G(T.node, a))
1341
1386
  )
1342
1387
  ), l["newlines-between"] !== "ignore") {
1343
- let T = A.at(b + 1);
1344
- if (T) {
1388
+ let L = N.at(E + 1);
1389
+ if (L) {
1345
1390
  let R = c(
1346
- p.at(b),
1347
- p.at(b + 1)
1391
+ p.at(E),
1392
+ p.at(E + 1)
1348
1393
  );
1349
- (l["newlines-between"] === "always" && x(l.groups, M) === x(l.groups, T) && R !== 0 || l["newlines-between"] === "never" && R > 0) && h.push(
1394
+ (l["newlines-between"] === "always" && x(l.groups, T) === x(l.groups, L) && R !== 0 || l["newlines-between"] === "never" && R > 0) && h.push(
1350
1395
  g.removeRange([
1351
- L(p.at(b).node, a).at(1),
1352
- L(p.at(b + 1).node, a).at(0) - 1
1396
+ G(p.at(E).node, a).at(1),
1397
+ G(p.at(E + 1).node, a).at(0) - 1
1353
1398
  ])
1354
- ), l["newlines-between"] === "always" && x(l.groups, M) !== x(l.groups, T) && R > 1 && h.push(
1399
+ ), l["newlines-between"] === "always" && x(l.groups, T) !== x(l.groups, L) && R > 1 && h.push(
1355
1400
  g.replaceTextRange(
1356
1401
  [
1357
- L(p.at(b).node, a).at(1),
1358
- L(p.at(b + 1).node, a).at(
1402
+ G(p.at(E).node, a).at(1),
1403
+ G(p.at(E + 1).node, a).at(
1359
1404
  0
1360
1405
  ) - 1
1361
1406
  ],
1362
1407
  `
1363
1408
  `
1364
1409
  )
1365
- ), l["newlines-between"] === "always" && x(l.groups, M) !== x(l.groups, T) && R === 0 && h.push(
1410
+ ), l["newlines-between"] === "always" && x(l.groups, T) !== x(l.groups, L) && R === 0 && h.push(
1366
1411
  g.insertTextAfterRange(
1367
- L(p.at(b).node, a),
1412
+ G(p.at(E).node, a),
1368
1413
  `
1369
1414
  `
1370
1415
  )
@@ -1380,45 +1425,45 @@ const J = "sort-array-includes", de = v({
1380
1425
  }
1381
1426
  for (let g of y)
1382
1427
  C(g, (p, h) => {
1383
- let S = x(l.groups, p), A = x(l.groups, h), b = c(p, h);
1384
- !(t(p.node) && t(h.node)) && !r(p, h) && (S > A || S === A && j(I(p, h, l))) && s.report({
1428
+ let S = x(l.groups, p), N = x(l.groups, h), E = c(p, h);
1429
+ !(t(p.node) && t(h.node)) && !r(p, h) && (S > N || S === N && j(w(p, h, l))) && s.report({
1385
1430
  messageId: "unexpectedImportsOrder",
1386
1431
  data: {
1387
1432
  left: p.name,
1388
1433
  right: h.name
1389
1434
  },
1390
1435
  node: h.node,
1391
- fix: (E) => d(E, g)
1392
- }), l["newlines-between"] === "never" && b > 0 && s.report({
1436
+ fix: (b) => d(b, g)
1437
+ }), l["newlines-between"] === "never" && E > 0 && s.report({
1393
1438
  messageId: "extraSpacingBetweenImports",
1394
1439
  data: {
1395
1440
  left: p.name,
1396
1441
  right: h.name
1397
1442
  },
1398
1443
  node: h.node,
1399
- fix: (E) => d(E, g)
1400
- }), l["newlines-between"] === "always" && (S < A && b === 0 ? s.report({
1444
+ fix: (b) => d(b, g)
1445
+ }), l["newlines-between"] === "always" && (S < N && E === 0 ? s.report({
1401
1446
  messageId: "missedSpacingBetweenImports",
1402
1447
  data: {
1403
1448
  left: p.name,
1404
1449
  right: h.name
1405
1450
  },
1406
1451
  node: h.node,
1407
- fix: (E) => d(E, g)
1408
- }) : (b > 1 || S === A && b > 0) && s.report({
1452
+ fix: (b) => d(b, g)
1453
+ }) : (E > 1 || S === N && E > 0) && s.report({
1409
1454
  messageId: "extraSpacingBetweenImports",
1410
1455
  data: {
1411
1456
  left: p.name,
1412
1457
  right: h.name
1413
1458
  },
1414
1459
  node: h.node,
1415
- fix: (E) => d(E, g)
1460
+ fix: (b) => d(b, g)
1416
1461
  }));
1417
1462
  });
1418
1463
  }
1419
1464
  };
1420
1465
  }
1421
- }), te = "sort-objects", Ne = v({
1466
+ }), te = "sort-objects", Ae = O({
1422
1467
  name: te,
1423
1468
  meta: {
1424
1469
  type: "suggestion",
@@ -1499,68 +1544,68 @@ const J = "sort-array-includes", de = v({
1499
1544
  a["partition-by-comment"],
1500
1545
  y.value
1501
1546
  ) && c.push([]);
1502
- let m, g = "ignore", p = [], { getGroup: h, setCustomGroups: S } = G(a.groups);
1503
- d.key.type === "Identifier" ? { name: m } = d.key : d.key.type === "Literal" ? m = `${d.key.value}` : m = e.text.slice(...d.key.range), d.value.type === "AssignmentPattern" && ((E) => {
1504
- E.right.type === "Identifier" && p.push(E.right.name);
1505
- let M = (T) => {
1547
+ let m, g = "ignore", p = [], { getGroup: h, setCustomGroups: S } = M(a.groups);
1548
+ d.key.type === "Identifier" ? { name: m } = d.key : d.key.type === "Literal" ? m = `${d.key.value}` : m = e.text.slice(...d.key.range), d.value.type === "AssignmentPattern" && ((b) => {
1549
+ b.right.type === "Identifier" && p.push(b.right.name);
1550
+ let T = (L) => {
1506
1551
  let R = [];
1507
- switch (T.type) {
1552
+ switch (L.type) {
1508
1553
  case "ArrowFunctionExpression":
1509
- R.push(T.body);
1554
+ R.push(L.body);
1510
1555
  break;
1511
1556
  case "ConditionalExpression":
1512
- R.push(T.consequent, T.alternate);
1557
+ R.push(L.consequent, L.alternate);
1513
1558
  break;
1514
1559
  case "LogicalExpression":
1515
1560
  case "BinaryExpression":
1516
- R.push(T.left, T.right);
1561
+ R.push(L.left, L.right);
1517
1562
  break;
1518
1563
  case "CallExpression":
1519
- R.push(...T.arguments);
1564
+ R.push(...L.arguments);
1520
1565
  break;
1521
1566
  }
1522
- R.forEach((B) => {
1523
- B.type === "Identifier" && p.push(B.name), (B.type === "BinaryExpression" || B.type === "ConditionalExpression") && M(B);
1567
+ R.forEach((U) => {
1568
+ U.type === "Identifier" && p.push(U.name), (U.type === "BinaryExpression" || U.type === "ConditionalExpression") && T(U);
1524
1569
  });
1525
1570
  };
1526
- switch (E.right.type) {
1571
+ switch (b.right.type) {
1527
1572
  case "ArrowFunctionExpression":
1528
1573
  case "ConditionalExpression":
1529
1574
  case "LogicalExpression":
1530
1575
  case "BinaryExpression":
1531
1576
  case "CallExpression":
1532
- M(E.right);
1577
+ T(b.right);
1533
1578
  break;
1534
1579
  }
1535
1580
  })(d.value), S(a["custom-groups"], m);
1536
- let A = {
1537
- size: w(d.range),
1581
+ let N = {
1582
+ size: v(d.range),
1538
1583
  group: h(),
1539
1584
  dependencies: p,
1540
1585
  node: d,
1541
1586
  position: g,
1542
1587
  name: m
1543
1588
  };
1544
- return c.at(-1).push(A), c;
1589
+ return c.at(-1).push(N), c;
1545
1590
  },
1546
1591
  [[]]
1547
1592
  );
1548
1593
  for (let r of o(n.properties))
1549
1594
  C(r, (c, d) => {
1550
1595
  let y = x(a.groups, c), m = x(a.groups, d);
1551
- if (y > m || y === m && j(I(c, d, a))) {
1596
+ if (y > m || y === m && j(w(c, d, a))) {
1552
1597
  let g = (p) => {
1553
1598
  let h = {};
1554
- for (let A of r) {
1555
- let b = x(a.groups, A);
1556
- b in h ? h[b] = N(
1557
- [...h[b], A],
1599
+ for (let N of r) {
1600
+ let E = x(a.groups, N);
1601
+ E in h ? h[E] = A(
1602
+ [...h[E], N],
1558
1603
  a
1559
- ) : h[b] = [A];
1604
+ ) : h[E] = [N];
1560
1605
  }
1561
1606
  let S = [];
1562
- for (let A of Object.keys(h).sort())
1563
- S.push(...N(h[A], a));
1607
+ for (let N of Object.keys(h).sort())
1608
+ S.push(...A(h[N], a));
1564
1609
  return P(p, r, S, e, {
1565
1610
  partitionComment: a["partition-by-comment"]
1566
1611
  });
@@ -1568,8 +1613,8 @@ const J = "sort-array-includes", de = v({
1568
1613
  s.report({
1569
1614
  messageId: "unexpectedObjectsOrder",
1570
1615
  data: {
1571
- left: O(c.name),
1572
- right: O(d.name)
1616
+ left: I(c.name),
1617
+ right: I(d.name)
1573
1618
  },
1574
1619
  node: d.node,
1575
1620
  fix: g
@@ -1583,7 +1628,7 @@ const J = "sort-array-includes", de = v({
1583
1628
  ObjectPattern: l
1584
1629
  };
1585
1630
  }
1586
- }), re = "sort-classes", Ae = v({
1631
+ }), re = "sort-classes", Ne = O({
1587
1632
  name: re,
1588
1633
  meta: {
1589
1634
  type: "suggestion",
@@ -1641,14 +1686,20 @@ const J = "sort-array-includes", de = v({
1641
1686
  groups: ["property", "constructor", "method", "unknown"]
1642
1687
  }), a = s.getSourceCode(), u = l.body.map((t) => {
1643
1688
  var d;
1644
- let e, { getGroup: o, defineGroup: r } = G(n.groups);
1689
+ let e, { getGroup: o, defineGroup: r } = M(n.groups);
1645
1690
  t.type === "StaticBlock" ? e = "static" : t.type === "TSIndexSignature" ? e = a.text.slice(
1646
1691
  t.range.at(0),
1647
1692
  ((d = t.typeAnnotation) == null ? void 0 : d.range.at(0)) ?? t.range.at(1)
1648
1693
  ) : t.key.type === "Identifier" ? { name: e } = t.key : e = a.text.slice(...t.key.range);
1649
1694
  let c = e.startsWith("_") || e.startsWith("#");
1650
- return t.type === "MethodDefinition" ? (t.kind === "constructor" && r("constructor"), (t.accessibility === "private" || c) && r("private-method"), t.static && r("static-method"), t.kind === "get" && r("get-method"), t.kind === "set" && r("set-method"), r("method")) : t.type === "TSIndexSignature" ? r("index-signature") : t.type === "PropertyDefinition" && ((t.accessibility === "private" || c) && r("private-property"), t.static && r("static-property"), r("property")), {
1651
- size: w(t.range),
1695
+ if (t.type === "MethodDefinition") {
1696
+ t.kind === "constructor" && r("constructor");
1697
+ let y = t.accessibility === "private" || c, m = t.static;
1698
+ y && m && r("static-private-method"), y && r("private-method"), m && r("static-method"), t.kind === "get" && r("get-method"), t.kind === "set" && r("set-method"), r("method");
1699
+ } else
1700
+ t.type === "TSIndexSignature" ? r("index-signature") : t.type === "PropertyDefinition" && ((t.accessibility === "private" || c) && r("private-property"), t.static && r("static-property"), r("property"));
1701
+ return {
1702
+ size: v(t.range),
1652
1703
  group: o(),
1653
1704
  node: t,
1654
1705
  name: e
@@ -1656,18 +1707,18 @@ const J = "sort-array-includes", de = v({
1656
1707
  });
1657
1708
  C(u, (t, e) => {
1658
1709
  let o = x(n.groups, t), r = x(n.groups, e);
1659
- t.name !== e.name && (o > r || o === r && j(I(t, e, n))) && s.report({
1710
+ t.name !== e.name && (o > r || o === r && j(w(t, e, n))) && s.report({
1660
1711
  messageId: "unexpectedClassesOrder",
1661
1712
  data: {
1662
- left: O(t.name),
1663
- right: O(e.name)
1713
+ left: I(t.name),
1714
+ right: I(e.name)
1664
1715
  },
1665
1716
  node: e.node,
1666
1717
  fix: (c) => {
1667
1718
  let d = [], y = u.reduce(
1668
1719
  (g, p) => {
1669
1720
  let h = x(n.groups, p);
1670
- return h in g ? g[h] = N(
1721
+ return h in g ? g[h] = A(
1671
1722
  [...g[h], p],
1672
1723
  n
1673
1724
  ) : g[h] = [p], g;
@@ -1683,9 +1734,9 @@ const J = "sort-array-includes", de = v({
1683
1734
  for (let g = 0, p = m.length; g < p; g++)
1684
1735
  d.push(
1685
1736
  c.replaceTextRange(
1686
- L(u.at(g).node, a),
1737
+ G(u.at(g).node, a),
1687
1738
  a.text.slice(
1688
- ...L(m.at(g).node, a)
1739
+ ...G(m.at(g).node, a)
1689
1740
  )
1690
1741
  )
1691
1742
  );
@@ -1696,7 +1747,7 @@ const J = "sort-array-includes", de = v({
1696
1747
  }
1697
1748
  }
1698
1749
  })
1699
- }), se = "sort-enums", Ie = v({
1750
+ }), se = "sort-enums", we = O({
1700
1751
  name: se,
1701
1752
  meta: {
1702
1753
  type: "suggestion",
@@ -1749,24 +1800,24 @@ const J = "sort-array-includes", de = v({
1749
1800
  "ignore-case": !1
1750
1801
  }), a = s.getSourceCode(), u = l.members.map((t) => ({
1751
1802
  name: t.id.type === "Literal" ? `${t.id.value}` : `${a.text.slice(...t.id.range)}`,
1752
- size: w(t.range),
1803
+ size: v(t.range),
1753
1804
  node: t
1754
1805
  }));
1755
1806
  C(u, (t, e) => {
1756
- j(I(t, e, n)) && s.report({
1807
+ j(w(t, e, n)) && s.report({
1757
1808
  messageId: "unexpectedEnumsOrder",
1758
1809
  data: {
1759
- left: O(t.name),
1760
- right: O(e.name)
1810
+ left: I(t.name),
1811
+ right: I(e.name)
1761
1812
  },
1762
1813
  node: e.node,
1763
- fix: (o) => P(o, u, N(u, n), a)
1814
+ fix: (o) => P(o, u, A(u, n), a)
1764
1815
  });
1765
1816
  });
1766
1817
  }
1767
1818
  }
1768
1819
  })
1769
- }), ae = "sort-maps", Oe = v({
1820
+ }), ae = "sort-maps", Ie = O({
1770
1821
  name: ae,
1771
1822
  meta: {
1772
1823
  type: "suggestion",
@@ -1832,20 +1883,20 @@ const J = "sort-array-includes", de = v({
1832
1883
  } else
1833
1884
  c = u.text.slice(...r.range);
1834
1885
  return {
1835
- size: w(r.range),
1886
+ size: v(r.range),
1836
1887
  node: r,
1837
1888
  name: c
1838
1889
  };
1839
1890
  });
1840
1891
  C(o, (r, c) => {
1841
- j(I(r, c, a)) && s.report({
1892
+ j(w(r, c, a)) && s.report({
1842
1893
  messageId: "unexpectedMapElementsOrder",
1843
1894
  data: {
1844
- left: O(r.name),
1845
- right: O(c.name)
1895
+ left: I(r.name),
1896
+ right: I(c.name)
1846
1897
  },
1847
1898
  node: c.node,
1848
- fix: (d) => P(d, o, N(o, a), u)
1899
+ fix: (d) => P(d, o, A(o, a), u)
1849
1900
  });
1850
1901
  });
1851
1902
  }
@@ -1853,7 +1904,7 @@ const J = "sort-array-includes", de = v({
1853
1904
  }
1854
1905
  }
1855
1906
  })
1856
- }), ve = "eslint-plugin-perfectionist";
1907
+ }), Oe = "eslint-plugin-perfectionist";
1857
1908
  let z = (s) => {
1858
1909
  let l = {
1859
1910
  [ee]: [
@@ -1906,8 +1957,8 @@ let z = (s) => {
1906
1957
  "spread-last": !0
1907
1958
  }
1908
1959
  ],
1909
- [V]: ["error"],
1910
1960
  [W]: ["error"],
1961
+ [V]: ["error"],
1911
1962
  [X]: ["error"],
1912
1963
  [K]: ["error"],
1913
1964
  [q]: ["error"],
@@ -1932,19 +1983,19 @@ let z = (s) => {
1932
1983
  const Te = {
1933
1984
  rules: {
1934
1985
  [J]: de,
1935
- [W]: ce,
1936
- [re]: Ae,
1937
- [se]: Ie,
1986
+ [V]: ce,
1987
+ [re]: Ne,
1988
+ [se]: we,
1938
1989
  [Z]: Ee,
1939
1990
  [ee]: Se,
1940
1991
  [Q]: be,
1941
1992
  [Y]: xe,
1942
- [ae]: Oe,
1993
+ [ae]: Ie,
1943
1994
  [K]: ge,
1944
1995
  [q]: ye,
1945
1996
  [F]: me,
1946
- [te]: Ne,
1947
- [V]: ue,
1997
+ [te]: Ae,
1998
+ [W]: ue,
1948
1999
  [H]: he,
1949
2000
  [X]: fe
1950
2001
  },
@@ -1964,7 +2015,7 @@ const Te = {
1964
2015
  order: f.desc
1965
2016
  })
1966
2017
  },
1967
- name: ve
2018
+ name: Oe
1968
2019
  };
1969
2020
  export {
1970
2021
  Te as default