eslint-plugin-perfectionist 2.4.1 → 2.5.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,105 +1,105 @@
1
- import B from "node:path";
2
- import { ESLintUtils as pe, ASTUtils as _ } from "@typescript-eslint/utils";
1
+ import _ from "node:path";
2
+ import { ESLintUtils as ue, ASTUtils as W } from "@typescript-eslint/utils";
3
3
  import { minimatch as $ } from "minimatch";
4
- import ue from "natural-compare-lite";
5
- import { builtinModules as de } from "node:module";
6
- let O = pe.RuleCreator(
4
+ import de from "natural-compare-lite";
5
+ import { builtinModules as ce } from "node:module";
6
+ let v = ue.RuleCreator(
7
7
  (t) => `https://eslint-plugin-perfectionist.azat.io/rules/${t}`
8
- ), x = (t, n) => {
8
+ ), E = (t, o) => {
9
9
  for (let s = 0, l = t.length; s < l; s++) {
10
10
  let r = t[s];
11
- if (n.group === r || Array.isArray(r) && typeof n.group == "string" && r.includes(n.group))
11
+ if (o.group === r || Array.isArray(r) && typeof o.group == "string" && r.includes(o.group))
12
12
  return s;
13
13
  }
14
14
  return t.length;
15
- }, v = (t) => {
16
- let [n, s] = t;
17
- return s - n;
18
- }, I = (t) => t > 0;
19
- var p = /* @__PURE__ */ ((t) => (t.alphabetical = "alphabetical", t["line-length"] = "line-length", t.natural = "natural", t))(p || {}), g = /* @__PURE__ */ ((t) => (t.desc = "desc", t.asc = "asc", t))(g || {});
20
- let G = (t) => {
21
- let n, s = (r) => {
22
- !n && t.flat().includes(r) && (n = r);
15
+ }, O = (t) => {
16
+ let [o, s] = t;
17
+ return s - o;
18
+ }, j = (t) => t > 0;
19
+ var i = /* @__PURE__ */ ((t) => (t.alphabetical = "alphabetical", t["line-length"] = "line-length", t.natural = "natural", t))(i || {}), c = /* @__PURE__ */ ((t) => (t.desc = "desc", t.asc = "asc", t))(c || {});
20
+ let M = (t) => {
21
+ let o, s = (r) => {
22
+ !o && t.flat().includes(r) && (o = r);
23
23
  };
24
24
  return {
25
- getGroup: () => n ?? "unknown",
25
+ getGroup: () => o ?? "unknown",
26
26
  setCustomGroups: (r, e) => {
27
27
  if (r)
28
- for (let [a, i] of Object.entries(r))
29
- Array.isArray(i) && i.some(
30
- (o) => $(e, o, {
28
+ for (let [a, p] of Object.entries(r))
29
+ Array.isArray(p) && p.some(
30
+ (n) => $(e, n, {
31
31
  nocomment: !0
32
32
  })
33
- ) && s(a), typeof i == "string" && $(e, i, {
33
+ ) && s(a), typeof p == "string" && $(e, p, {
34
34
  nocomment: !0
35
35
  }) && s(a);
36
36
  },
37
37
  defineGroup: s
38
38
  };
39
- }, S = (t, n, s) => {
40
- var a, i;
41
- if ((a = n.dependencies) != null && a.includes(t.name))
39
+ }, A = (t, o, s) => {
40
+ var a, p;
41
+ if ((a = o.dependencies) != null && a.includes(t.name))
42
42
  return -1;
43
- if ((i = t.dependencies) != null && i.includes(n.name))
43
+ if ((p = t.dependencies) != null && p.includes(o.name))
44
44
  return 1;
45
- let l = s.order === "asc" ? 1 : -1, r, e = (o) => s["ignore-case"] ? o.toLowerCase() : o;
46
- return s.type === p.alphabetical ? r = (o, u) => e(o.name).localeCompare(e(u.name)) : s.type === p.natural ? r = (o, u) => ue(e(o.name), e(u.name)) : r = (o, u) => {
47
- let y = o.size, m = u.size, c = s["max-line-length"];
48
- if (c) {
49
- let d = (f, b) => f > c && b.hasMultipleImportDeclarations;
50
- d(y, o) && (y = o.name.length + 10), d(m, u) && (m = u.name.length + 10);
45
+ let l = s.order === "asc" ? 1 : -1, r, e = (n) => s["ignore-case"] ? n.toLowerCase() : n;
46
+ return s.type === i.alphabetical ? r = (n, u) => e(n.name).localeCompare(e(u.name)) : s.type === i.natural ? r = (n, u) => de(e(n.name), e(u.name)) : r = (n, u) => {
47
+ let y = n.size, m = u.size, f = s["max-line-length"];
48
+ if (f) {
49
+ let d = (g, b) => g > f && b.hasMultipleImportDeclarations;
50
+ d(y, n) && (y = n.name.length + 10), d(m, u) && (m = u.name.length + 10);
51
51
  }
52
52
  return y - m;
53
- }, l * r(t, n);
54
- }, w = (t, n) => [...t].sort((s, l) => S(s, l, n)), ce = (t, n) => {
55
- let s = n.getTokenAfter(t, {
53
+ }, l * r(t, o);
54
+ }, w = (t, o) => [...t].sort((s, l) => A(s, l, o)), fe = (t, o) => {
55
+ let s = o.getTokenAfter(t, {
56
56
  filter: ({ value: l, type: r }) => !(r === "Punctuator" && [",", ";"].includes(l)),
57
57
  includeComments: !0
58
58
  });
59
59
  return ((s == null ? void 0 : s.type) === "Block" || (s == null ? void 0 : s.type) === "Line") && t.loc.end.line === s.loc.end.line ? s : null;
60
- }, ie = (t, n) => Array.isArray(t) && t.some(
61
- (s) => $(n.trim(), s, {
60
+ }, pe = (t, o) => Array.isArray(t) && t.some(
61
+ (s) => $(o.trim(), s, {
62
62
  nocomment: !0
63
63
  })
64
- ) || typeof t == "string" && $(n.trim(), t, {
64
+ ) || typeof t == "string" && $(o.trim(), t, {
65
65
  nocomment: !0
66
- }) || t === !0, V = (t, n) => {
67
- let [s, l] = n.getTokensBefore(t, {
66
+ }) || t === !0, J = (t, o) => {
67
+ let [s, l] = o.getTokensBefore(t, {
68
68
  filter: ({ value: r, type: e }) => !(e === "Punctuator" && [",", ";"].includes(r)),
69
69
  includeComments: !0,
70
70
  count: 2
71
71
  });
72
72
  return ((l == null ? void 0 : l.type) === "Block" || (l == null ? void 0 : l.type) === "Line") && t.loc.start.line - l.loc.end.line <= 1 && (s == null ? void 0 : s.loc.end.line) !== l.loc.start.line ? l : null;
73
- }, T = (t, n, s) => {
74
- var i;
75
- let l = t.range.at(0), r = t.range.at(1), e = n.text.slice(l, r);
76
- if (_.isParenthesized(t, n)) {
77
- let o = n.getTokenBefore(
73
+ }, T = (t, o, s) => {
74
+ var p;
75
+ let l = t.range.at(0), r = t.range.at(1), e = o.text.slice(l, r);
76
+ if (W.isParenthesized(t, o)) {
77
+ let n = o.getTokenBefore(
78
78
  t,
79
- _.isOpeningParenToken
80
- ), u = n.getTokenAfter(
79
+ W.isOpeningParenToken
80
+ ), u = o.getTokenAfter(
81
81
  t,
82
- _.isClosingParenToken
82
+ W.isClosingParenToken
83
83
  );
84
- l = o.range.at(0), r = u.range.at(1);
84
+ l = n.range.at(0), r = u.range.at(1);
85
85
  }
86
- let a = V(t, n);
86
+ let a = J(t, o);
87
87
  if (e.endsWith(";") || e.endsWith(",")) {
88
- let o = n.getTokensAfter(t, {
88
+ let n = o.getTokensAfter(t, {
89
89
  includeComments: !0,
90
90
  count: 2
91
91
  });
92
- t.loc.start.line === ((i = o.at(1)) == null ? void 0 : i.loc.start.line) && (r -= 1);
92
+ t.loc.start.line === ((p = n.at(1)) == null ? void 0 : p.loc.start.line) && (r -= 1);
93
93
  }
94
- return a && !ie(
94
+ return a && !pe(
95
95
  (s == null ? void 0 : s.partitionComment) ?? !1,
96
96
  a.value
97
97
  ) && (l = a.range.at(0)), [l, r];
98
- }, L = (t, n, s, l, r) => {
99
- var i, o;
100
- let e = [], a = ((i = n.at(0)) == null ? void 0 : i.node.loc.start.line) === ((o = n.at(-1)) == null ? void 0 : o.node.loc.end.line);
101
- for (let u = 0, y = n.length; u < y; u++) {
102
- let { node: m } = n.at(u);
98
+ }, L = (t, o, s, l, r) => {
99
+ var p, n;
100
+ let e = [], a = ((p = o.at(0)) == null ? void 0 : p.node.loc.start.line) === ((n = o.at(-1)) == null ? void 0 : n.node.loc.end.line);
101
+ for (let u = 0, y = o.length; u < y; u++) {
102
+ let { node: m } = o.at(u);
103
103
  e.push(
104
104
  t.replaceTextRange(
105
105
  T(m, l, r),
@@ -108,32 +108,32 @@ let G = (t) => {
108
108
  )
109
109
  )
110
110
  );
111
- let c = ce(s.at(u).node, l);
112
- if (c && !a) {
113
- let f = [
114
- l.getTokenBefore(c).range.at(1),
115
- c.range.at(1)
111
+ let f = fe(s.at(u).node, l);
112
+ if (f && !a) {
113
+ let g = [
114
+ l.getTokenBefore(f).range.at(1),
115
+ f.range.at(1)
116
116
  ];
117
- e.push(t.replaceTextRange(f, ""));
117
+ e.push(t.replaceTextRange(g, ""));
118
118
  let b = l.getTokenAfter(m);
119
119
  e.push(
120
120
  t.insertTextAfter(
121
121
  (b == null ? void 0 : b.loc.end.line) === m.loc.end.line ? b : m,
122
- l.text.slice(...f)
122
+ l.text.slice(...g)
123
123
  )
124
124
  );
125
125
  }
126
126
  }
127
127
  return e;
128
- }, j = (t = {}, n) => Object.assign(n, t), k = (t, n) => {
128
+ }, k = (t = {}, o) => Object.assign(o, t), P = (t, o) => {
129
129
  if (t.length > 1)
130
130
  for (let s = 1; s < t.length; s++) {
131
131
  let l = t.at(s - 1), r = t.at(s);
132
- l && r && n(l, r, s - 1);
132
+ l && r && o(l, r, s - 1);
133
133
  }
134
134
  };
135
- const J = "sort-svelte-attributes", fe = O({
136
- name: J,
135
+ const X = "sort-svelte-attributes", ge = v({
136
+ name: X,
137
137
  meta: {
138
138
  type: "suggestion",
139
139
  docs: {
@@ -149,16 +149,16 @@ const J = "sort-svelte-attributes", fe = O({
149
149
  },
150
150
  type: {
151
151
  enum: [
152
- p.alphabetical,
153
- p.natural,
154
- p["line-length"]
152
+ i.alphabetical,
153
+ i.natural,
154
+ i["line-length"]
155
155
  ],
156
- default: p.alphabetical,
156
+ default: i.alphabetical,
157
157
  type: "string"
158
158
  },
159
159
  order: {
160
- enum: [g.asc, g.desc],
161
- default: g.asc,
160
+ enum: [c.asc, c.desc],
161
+ default: c.asc,
162
162
  type: "string"
163
163
  },
164
164
  "ignore-case": {
@@ -178,39 +178,39 @@ const J = "sort-svelte-attributes", fe = O({
178
178
  },
179
179
  defaultOptions: [
180
180
  {
181
- type: p.alphabetical,
182
- order: g.asc
181
+ type: i.alphabetical,
182
+ order: c.asc
183
183
  }
184
184
  ],
185
- create: (t) => B.extname(t.filename) !== ".svelte" ? {} : {
186
- SvelteStartTag: (n) => {
187
- if (n.attributes.length > 1) {
188
- let s = j(t.options.at(0), {
189
- type: p.alphabetical,
190
- order: g.asc,
185
+ create: (t) => _.extname(t.filename) !== ".svelte" ? {} : {
186
+ SvelteStartTag: (o) => {
187
+ if (o.attributes.length > 1) {
188
+ let s = k(t.options.at(0), {
189
+ type: i.alphabetical,
190
+ order: c.asc,
191
191
  "ignore-case": !1,
192
192
  "custom-groups": {},
193
193
  groups: []
194
- }), l = n.attributes.reduce(
194
+ }), l = o.attributes.reduce(
195
195
  (r, e) => {
196
196
  if (e.type === "SvelteSpreadAttribute")
197
197
  return r.push([]), r;
198
- let a, { getGroup: i, defineGroup: o, setCustomGroups: u } = G(
198
+ let a, { getGroup: p, defineGroup: n, setCustomGroups: u } = M(
199
199
  s.groups
200
200
  );
201
- return e.key.type === "SvelteSpecialDirectiveKey" ? a = t.sourceCode.text.slice(...e.key.range) : typeof e.key.name == "string" ? { name: a } = e.key : a = t.sourceCode.text.slice(...e.key.range), u(s["custom-groups"], a), e.type === "SvelteShorthandAttribute" && (o("svelte-shorthand"), o("shorthand")), (!("value" in e) || Array.isArray(e.value) && !e.value.at(0)) && o("shorthand"), e.loc.start.line !== e.loc.end.line && o("multiline"), r.at(-1).push({
202
- size: v(e.range),
201
+ return e.key.type === "SvelteSpecialDirectiveKey" ? a = t.sourceCode.text.slice(...e.key.range) : typeof e.key.name == "string" ? { name: a } = e.key : a = t.sourceCode.text.slice(...e.key.range), u(s["custom-groups"], a), e.type === "SvelteShorthandAttribute" && (n("svelte-shorthand"), n("shorthand")), (!("value" in e) || Array.isArray(e.value) && !e.value.at(0)) && n("shorthand"), e.loc.start.line !== e.loc.end.line && n("multiline"), r.at(-1).push({
202
+ size: O(e.range),
203
203
  node: e,
204
- group: i(),
204
+ group: p(),
205
205
  name: a
206
206
  }), r;
207
207
  },
208
208
  [[]]
209
209
  );
210
210
  for (let r of l)
211
- k(r, (e, a) => {
212
- let i = x(s.groups, e), o = x(s.groups, a);
213
- (i > o || i === o && I(S(e, a, s))) && t.report({
211
+ P(r, (e, a) => {
212
+ let p = E(s.groups, e), n = E(s.groups, a);
213
+ (p > n || p === n && j(A(e, a, s))) && t.report({
214
214
  messageId: "unexpectedSvelteAttributesOrder",
215
215
  data: {
216
216
  left: e.name,
@@ -219,18 +219,18 @@ const J = "sort-svelte-attributes", fe = O({
219
219
  node: a.node,
220
220
  fix: (u) => {
221
221
  let y = {};
222
- for (let c of r) {
223
- let d = x(s.groups, c);
222
+ for (let f of r) {
223
+ let d = E(s.groups, f);
224
224
  d in y ? y[d] = w(
225
- [...y[d], c],
225
+ [...y[d], f],
226
226
  s
227
- ) : y[d] = [c];
227
+ ) : y[d] = [f];
228
228
  }
229
229
  let m = [];
230
- for (let c of Object.keys(y).sort(
231
- (d, f) => Number(d) - Number(f)
230
+ for (let f of Object.keys(y).sort(
231
+ (d, g) => Number(d) - Number(g)
232
232
  ))
233
- m.push(...w(y[c], s));
233
+ m.push(...w(y[f], s));
234
234
  return L(
235
235
  u,
236
236
  r,
@@ -243,8 +243,8 @@ const J = "sort-svelte-attributes", fe = O({
243
243
  }
244
244
  }
245
245
  }
246
- }), X = "sort-astro-attributes", ge = O({
247
- name: X,
246
+ }), q = "sort-astro-attributes", ye = v({
247
+ name: q,
248
248
  meta: {
249
249
  type: "suggestion",
250
250
  docs: {
@@ -260,16 +260,16 @@ const J = "sort-svelte-attributes", fe = O({
260
260
  },
261
261
  type: {
262
262
  enum: [
263
- p.alphabetical,
264
- p.natural,
265
- p["line-length"]
263
+ i.alphabetical,
264
+ i.natural,
265
+ i["line-length"]
266
266
  ],
267
- default: p.alphabetical,
267
+ default: i.alphabetical,
268
268
  type: "string"
269
269
  },
270
270
  order: {
271
- enum: [g.asc, g.desc],
272
- default: g.asc,
271
+ enum: [c.asc, c.desc],
272
+ default: c.asc,
273
273
  type: "string"
274
274
  },
275
275
  "ignore-case": {
@@ -289,18 +289,18 @@ const J = "sort-svelte-attributes", fe = O({
289
289
  },
290
290
  defaultOptions: [
291
291
  {
292
- type: p.alphabetical,
293
- order: g.asc
292
+ type: i.alphabetical,
293
+ order: c.asc
294
294
  }
295
295
  ],
296
296
  // @ts-ignore
297
- create: (t) => B.extname(t.filename) !== ".astro" ? {} : {
298
- JSXElement: (n) => {
299
- let { attributes: s } = n.openingElement;
297
+ create: (t) => _.extname(t.filename) !== ".astro" ? {} : {
298
+ JSXElement: (o) => {
299
+ let { attributes: s } = o.openingElement;
300
300
  if (s.length > 1) {
301
- let l = j(t.options.at(0), {
302
- type: p.alphabetical,
303
- order: g.asc,
301
+ let l = k(t.options.at(0), {
302
+ type: i.alphabetical,
303
+ order: c.asc,
304
304
  "ignore-case": !1,
305
305
  "custom-groups": {},
306
306
  groups: []
@@ -308,46 +308,46 @@ const J = "sort-svelte-attributes", fe = O({
308
308
  (e, a) => {
309
309
  if (a.type === "JSXSpreadAttribute")
310
310
  return e.push([]), e;
311
- let i = typeof a.name.name == "string" ? a.name.name : t.sourceCode.text.slice(...a.name.range), { getGroup: o, defineGroup: u, setCustomGroups: y } = G(
311
+ let p = typeof a.name.name == "string" ? a.name.name : t.sourceCode.text.slice(...a.name.range), { getGroup: n, defineGroup: u, setCustomGroups: y } = M(
312
312
  l.groups
313
313
  );
314
- return y(l["custom-groups"], i), a.type === "AstroShorthandAttribute" && (u("astro-shorthand"), u("shorthand")), a.value === null && u("shorthand"), a.loc.start.line !== a.loc.end.line && u("multiline"), e.at(-1).push({
315
- size: v(a.range),
314
+ return y(l["custom-groups"], p), a.type === "AstroShorthandAttribute" && (u("astro-shorthand"), u("shorthand")), a.value === null && u("shorthand"), a.loc.start.line !== a.loc.end.line && u("multiline"), e.at(-1).push({
315
+ size: O(a.range),
316
316
  node: a,
317
- group: o(),
318
- name: i
317
+ group: n(),
318
+ name: p
319
319
  }), e;
320
320
  },
321
321
  [[]]
322
322
  );
323
323
  for (let e of r)
324
- k(e, (a, i) => {
325
- let o = x(l.groups, a), u = x(l.groups, i);
326
- (o > u || o === u && I(S(a, i, l))) && t.report({
324
+ P(e, (a, p) => {
325
+ let n = E(l.groups, a), u = E(l.groups, p);
326
+ (n > u || n === u && j(A(a, p, l))) && t.report({
327
327
  messageId: "unexpectedAstroAttributesOrder",
328
328
  data: {
329
329
  left: a.name,
330
- right: i.name
330
+ right: p.name
331
331
  },
332
- node: i.node,
332
+ node: p.node,
333
333
  fix: (y) => {
334
334
  let m = {};
335
335
  for (let d of e) {
336
- let f = x(l.groups, d);
337
- f in m ? m[f] = w(
338
- [...m[f], d],
336
+ let g = E(l.groups, d);
337
+ g in m ? m[g] = w(
338
+ [...m[g], d],
339
339
  l
340
- ) : m[f] = [d];
340
+ ) : m[g] = [d];
341
341
  }
342
- let c = [];
342
+ let f = [];
343
343
  for (let d of Object.keys(m).sort(
344
- (f, b) => Number(f) - Number(b)
344
+ (g, b) => Number(g) - Number(b)
345
345
  ))
346
- c.push(...w(m[d], l));
346
+ f.push(...w(m[d], l));
347
347
  return L(
348
348
  y,
349
349
  e,
350
- c,
350
+ f,
351
351
  t.sourceCode
352
352
  );
353
353
  }
@@ -357,9 +357,9 @@ const J = "sort-svelte-attributes", fe = O({
357
357
  }
358
358
  }
359
359
  });
360
- let A = (t) => t.replaceAll(/\s\s+/g, " ").trim();
361
- const q = "sort-array-includes", ye = O({
362
- name: q,
360
+ let I = (t) => t.replaceAll(/\s\s+/g, " ").trim();
361
+ const K = "sort-array-includes", me = v({
362
+ name: K,
363
363
  meta: {
364
364
  type: "suggestion",
365
365
  docs: {
@@ -372,16 +372,16 @@ const q = "sort-array-includes", ye = O({
372
372
  properties: {
373
373
  type: {
374
374
  enum: [
375
- p.alphabetical,
376
- p.natural,
377
- p["line-length"]
375
+ i.alphabetical,
376
+ i.natural,
377
+ i["line-length"]
378
378
  ],
379
- default: p.alphabetical,
379
+ default: i.alphabetical,
380
380
  type: "string"
381
381
  },
382
382
  order: {
383
- enum: [g.asc, g.desc],
384
- default: g.asc,
383
+ enum: [c.asc, c.desc],
384
+ default: c.asc,
385
385
  type: "string"
386
386
  },
387
387
  "ignore-case": {
@@ -402,45 +402,45 @@ const q = "sort-array-includes", ye = O({
402
402
  },
403
403
  defaultOptions: [
404
404
  {
405
- type: p.alphabetical,
406
- order: g.asc
405
+ type: i.alphabetical,
406
+ order: c.asc
407
407
  }
408
408
  ],
409
409
  create: (t) => ({
410
- MemberExpression: (n) => {
411
- if ((n.object.type === "ArrayExpression" || n.object.type === "NewExpression") && n.property.type === "Identifier" && n.property.name === "includes") {
412
- let s = n.object.type === "ArrayExpression" ? n.object.elements : n.object.arguments;
410
+ MemberExpression: (o) => {
411
+ if ((o.object.type === "ArrayExpression" || o.object.type === "NewExpression") && o.property.type === "Identifier" && o.property.name === "includes") {
412
+ let s = o.object.type === "ArrayExpression" ? o.object.elements : o.object.arguments;
413
413
  if (s.length > 1) {
414
- let l = j(t.options.at(0), {
415
- type: p.alphabetical,
416
- order: g.asc,
414
+ let l = k(t.options.at(0), {
415
+ type: i.alphabetical,
416
+ order: c.asc,
417
417
  "ignore-case": !1,
418
418
  "spread-last": !1
419
419
  }), r = s.reduce(
420
420
  (e, a) => (a !== null && e.at(0).push({
421
421
  name: a.type === "Literal" ? `${a.value}` : t.sourceCode.text.slice(...a.range),
422
- size: v(a.range),
422
+ size: O(a.range),
423
423
  type: a.type,
424
424
  node: a
425
425
  }), e),
426
426
  [[], []]
427
427
  ).flat();
428
- k(r, (e, a) => {
429
- let i;
430
- l["spread-last"] && e.node.type === "Literal" && a.node.type === "SpreadElement" ? i = !1 : l["spread-last"] && e.node.type === "SpreadElement" && a.node.type === "Literal" ? i = !0 : i = I(S(e, a, l)), i && t.report({
428
+ P(r, (e, a) => {
429
+ let p;
430
+ l["spread-last"] && e.node.type === "Literal" && a.node.type === "SpreadElement" ? p = !1 : l["spread-last"] && e.node.type === "SpreadElement" && a.node.type === "Literal" ? p = !0 : p = j(A(e, a, l)), p && t.report({
431
431
  messageId: "unexpectedArrayIncludesOrder",
432
432
  data: {
433
- left: A(e.name),
434
- right: A(a.name)
433
+ left: I(e.name),
434
+ right: I(a.name)
435
435
  },
436
436
  node: a.node,
437
- fix: (o) => {
437
+ fix: (n) => {
438
438
  let u = w(r, l);
439
439
  if (l["spread-last"])
440
440
  for (let y = 0, m = u.length; y < m; y++)
441
441
  u.at(y).node.type === "SpreadElement" && u.push(u.splice(y, 1).at(0));
442
442
  return L(
443
- o,
443
+ n,
444
444
  r,
445
445
  u,
446
446
  t.sourceCode
@@ -452,8 +452,8 @@ const q = "sort-array-includes", ye = O({
452
452
  }
453
453
  }
454
454
  })
455
- }), K = "sort-vue-attributes", me = O({
456
- name: K,
455
+ }), H = "sort-vue-attributes", he = v({
456
+ name: H,
457
457
  meta: {
458
458
  type: "suggestion",
459
459
  docs: {
@@ -469,16 +469,16 @@ const q = "sort-array-includes", ye = O({
469
469
  },
470
470
  type: {
471
471
  enum: [
472
- p.alphabetical,
473
- p.natural,
474
- p["line-length"]
472
+ i.alphabetical,
473
+ i.natural,
474
+ i["line-length"]
475
475
  ],
476
- default: p.alphabetical,
476
+ default: i.alphabetical,
477
477
  type: "string"
478
478
  },
479
479
  order: {
480
- enum: [g.asc, g.desc],
481
- default: g.asc,
480
+ enum: [c.asc, c.desc],
481
+ default: c.asc,
482
482
  type: "string"
483
483
  },
484
484
  "ignore-case": {
@@ -499,22 +499,22 @@ const q = "sort-array-includes", ye = O({
499
499
  },
500
500
  defaultOptions: [
501
501
  {
502
- type: p.alphabetical,
503
- order: g.asc
502
+ type: i.alphabetical,
503
+ order: c.asc
504
504
  }
505
505
  ],
506
506
  create: (t) => {
507
- if (B.extname(t.filename) !== ".vue")
507
+ if (_.extname(t.filename) !== ".vue")
508
508
  return {};
509
509
  if (!("defineTemplateBodyVisitor" in t.sourceCode.parserServices))
510
510
  return {};
511
- let { defineTemplateBodyVisitor: n } = t.sourceCode.parserServices;
512
- return n({
511
+ let { defineTemplateBodyVisitor: o } = t.sourceCode.parserServices;
512
+ return o({
513
513
  VStartTag: (s) => {
514
514
  if (s.attributes.length > 1) {
515
- let l = j(t.options.at(0), {
516
- type: p.alphabetical,
517
- order: g.asc,
515
+ let l = k(t.options.at(0), {
516
+ type: i.alphabetical,
517
+ order: c.asc,
518
518
  "ignore-case": !1,
519
519
  "custom-groups": {},
520
520
  groups: []
@@ -522,46 +522,46 @@ const q = "sort-array-includes", ye = O({
522
522
  (e, a) => {
523
523
  if (a.key.type === "VDirectiveKey" && a.key.name.rawName === "bind")
524
524
  return e.push([]), e;
525
- let i, { getGroup: o, defineGroup: u, setCustomGroups: y } = G(
525
+ let p, { getGroup: n, defineGroup: u, setCustomGroups: y } = M(
526
526
  l.groups
527
527
  );
528
- return typeof a.key.name == "string" && a.key.type !== "VDirectiveKey" ? i = a.key.rawName : i = t.sourceCode.text.slice(...a.key.range), y(l["custom-groups"], i), a.value === null && u("shorthand"), a.loc.start.line !== a.loc.end.line && u("multiline"), e.at(-1).push({
529
- size: v(a.range),
528
+ return typeof a.key.name == "string" && a.key.type !== "VDirectiveKey" ? p = a.key.rawName : p = t.sourceCode.text.slice(...a.key.range), y(l["custom-groups"], p), a.value === null && u("shorthand"), a.loc.start.line !== a.loc.end.line && u("multiline"), e.at(-1).push({
529
+ size: O(a.range),
530
530
  node: a,
531
- group: o(),
532
- name: i
531
+ group: n(),
532
+ name: p
533
533
  }), e;
534
534
  },
535
535
  [[]]
536
536
  );
537
537
  for (let e of r)
538
- k(e, (a, i) => {
539
- let o = x(l.groups, a), u = x(l.groups, i);
540
- (o > u || o === u && I(S(a, i, l))) && t.report({
538
+ P(e, (a, p) => {
539
+ let n = E(l.groups, a), u = E(l.groups, p);
540
+ (n > u || n === u && j(A(a, p, l))) && t.report({
541
541
  messageId: "unexpectedVueAttributesOrder",
542
542
  data: {
543
543
  left: a.name,
544
- right: i.name
544
+ right: p.name
545
545
  },
546
- node: i.node,
546
+ node: p.node,
547
547
  fix: (y) => {
548
548
  let m = {};
549
549
  for (let d of e) {
550
- let f = x(l.groups, d);
551
- f in m ? m[f] = w(
552
- [...m[f], d],
550
+ let g = E(l.groups, d);
551
+ g in m ? m[g] = w(
552
+ [...m[g], d],
553
553
  l
554
- ) : m[f] = [d];
554
+ ) : m[g] = [d];
555
555
  }
556
- let c = [];
556
+ let f = [];
557
557
  for (let d of Object.keys(m).sort(
558
- (f, b) => Number(f) - Number(b)
558
+ (g, b) => Number(g) - Number(b)
559
559
  ))
560
- c.push(...w(m[d], l));
560
+ f.push(...w(m[d], l));
561
561
  return L(
562
562
  y,
563
563
  e,
564
- c,
564
+ f,
565
565
  t.sourceCode
566
566
  );
567
567
  }
@@ -571,8 +571,8 @@ const q = "sort-array-includes", ye = O({
571
571
  }
572
572
  });
573
573
  }
574
- }), H = "sort-named-exports", he = O({
575
- name: H,
574
+ }), Q = "sort-named-exports", be = v({
575
+ name: Q,
576
576
  meta: {
577
577
  type: "suggestion",
578
578
  docs: {
@@ -585,16 +585,16 @@ const q = "sort-array-includes", ye = O({
585
585
  properties: {
586
586
  type: {
587
587
  enum: [
588
- p.alphabetical,
589
- p.natural,
590
- p["line-length"]
588
+ i.alphabetical,
589
+ i.natural,
590
+ i["line-length"]
591
591
  ],
592
- default: p.alphabetical,
592
+ default: i.alphabetical,
593
593
  type: "string"
594
594
  },
595
595
  order: {
596
- enum: [g.asc, g.desc],
597
- default: g.asc,
596
+ enum: [c.asc, c.desc],
597
+ default: c.asc,
598
598
  type: "string"
599
599
  },
600
600
  "ignore-case": {
@@ -611,24 +611,24 @@ const q = "sort-array-includes", ye = O({
611
611
  },
612
612
  defaultOptions: [
613
613
  {
614
- type: p.alphabetical,
615
- order: g.asc
614
+ type: i.alphabetical,
615
+ order: c.asc
616
616
  }
617
617
  ],
618
618
  create: (t) => ({
619
- ExportNamedDeclaration: (n) => {
620
- if (n.specifiers.length > 1) {
621
- let s = j(t.options.at(0), {
622
- type: p.alphabetical,
619
+ ExportNamedDeclaration: (o) => {
620
+ if (o.specifiers.length > 1) {
621
+ let s = k(t.options.at(0), {
622
+ type: i.alphabetical,
623
623
  "ignore-case": !1,
624
- order: g.asc
625
- }), l = n.specifiers.map((r) => ({
626
- size: v(r.range),
624
+ order: c.asc
625
+ }), l = o.specifiers.map((r) => ({
626
+ size: O(r.range),
627
627
  name: r.local.name,
628
628
  node: r
629
629
  }));
630
- k(l, (r, e) => {
631
- I(S(r, e, s)) && t.report({
630
+ P(l, (r, e) => {
631
+ j(A(r, e, s)) && t.report({
632
632
  messageId: "unexpectedNamedExportsOrder",
633
633
  data: {
634
634
  left: r.name,
@@ -646,8 +646,8 @@ const q = "sort-array-includes", ye = O({
646
646
  }
647
647
  }
648
648
  })
649
- }), Q = "sort-named-imports", be = O({
650
- name: Q,
649
+ }), Y = "sort-named-imports", xe = v({
650
+ name: Y,
651
651
  meta: {
652
652
  type: "suggestion",
653
653
  docs: {
@@ -660,16 +660,16 @@ const q = "sort-array-includes", ye = O({
660
660
  properties: {
661
661
  type: {
662
662
  enum: [
663
- p.alphabetical,
664
- p.natural,
665
- p["line-length"]
663
+ i.alphabetical,
664
+ i.natural,
665
+ i["line-length"]
666
666
  ],
667
- default: p.alphabetical,
667
+ default: i.alphabetical,
668
668
  type: "string"
669
669
  },
670
670
  order: {
671
- enum: [g.asc, g.desc],
672
- default: g.asc,
671
+ enum: [c.asc, c.desc],
672
+ default: c.asc,
673
673
  type: "string"
674
674
  },
675
675
  "ignore-case": {
@@ -690,39 +690,39 @@ const q = "sort-array-includes", ye = O({
690
690
  },
691
691
  defaultOptions: [
692
692
  {
693
- type: p.alphabetical,
694
- order: g.asc
693
+ type: i.alphabetical,
694
+ order: c.asc
695
695
  }
696
696
  ],
697
697
  create: (t) => ({
698
- ImportDeclaration: (n) => {
699
- let s = n.specifiers.filter(
698
+ ImportDeclaration: (o) => {
699
+ let s = o.specifiers.filter(
700
700
  ({ type: l }) => l === "ImportSpecifier"
701
701
  );
702
702
  if (s.length > 1) {
703
- let l = j(t.options.at(0), {
704
- type: p.alphabetical,
703
+ let l = k(t.options.at(0), {
704
+ type: i.alphabetical,
705
705
  "ignore-alias": !0,
706
706
  "ignore-case": !1,
707
- order: g.asc
707
+ order: c.asc
708
708
  }), r = s.map((e) => {
709
709
  let { name: a } = e.local;
710
710
  return l["ignore-alias"] && e.type === "ImportSpecifier" && ({ name: a } = e.imported), {
711
- size: v(e.range),
711
+ size: O(e.range),
712
712
  node: e,
713
713
  name: a
714
714
  };
715
715
  });
716
- k(r, (e, a) => {
717
- I(S(e, a, l)) && t.report({
716
+ P(r, (e, a) => {
717
+ j(A(e, a, l)) && t.report({
718
718
  messageId: "unexpectedNamedImportsOrder",
719
719
  data: {
720
720
  left: e.name,
721
721
  right: a.name
722
722
  },
723
723
  node: a.node,
724
- fix: (i) => L(
725
- i,
724
+ fix: (p) => L(
725
+ p,
726
726
  r,
727
727
  w(r, l),
728
728
  t.sourceCode
@@ -733,12 +733,12 @@ const q = "sort-array-includes", ye = O({
733
733
  }
734
734
  })
735
735
  });
736
- let z = (t, n, s) => t.lines.slice(
737
- n.node.loc.end.line,
736
+ let z = (t, o, s) => t.lines.slice(
737
+ o.node.loc.end.line,
738
738
  s.node.loc.start.line - 1
739
739
  ).filter((r) => !r.trim().length).length;
740
- const Y = "sort-object-types", xe = O({
741
- name: Y,
740
+ const Z = "sort-object-types", Ee = v({
741
+ name: Z,
742
742
  meta: {
743
743
  type: "suggestion",
744
744
  docs: {
@@ -754,16 +754,16 @@ const Y = "sort-object-types", xe = O({
754
754
  },
755
755
  type: {
756
756
  enum: [
757
- p.alphabetical,
758
- p.natural,
759
- p["line-length"]
757
+ i.alphabetical,
758
+ i.natural,
759
+ i["line-length"]
760
760
  ],
761
- default: p.alphabetical,
761
+ default: i.alphabetical,
762
762
  type: "string"
763
763
  },
764
764
  order: {
765
- enum: [g.asc, g.desc],
766
- default: g.asc,
765
+ enum: [c.asc, c.desc],
766
+ default: c.asc,
767
767
  type: "string"
768
768
  },
769
769
  "ignore-case": {
@@ -788,53 +788,53 @@ const Y = "sort-object-types", xe = O({
788
788
  },
789
789
  defaultOptions: [
790
790
  {
791
- type: p.alphabetical,
792
- order: g.asc
791
+ type: i.alphabetical,
792
+ order: c.asc
793
793
  }
794
794
  ],
795
795
  create: (t) => ({
796
- TSTypeLiteral: (n) => {
797
- if (n.members.length > 1) {
798
- let s = j(t.options.at(0), {
796
+ TSTypeLiteral: (o) => {
797
+ if (o.members.length > 1) {
798
+ let s = k(t.options.at(0), {
799
799
  "partition-by-new-line": !1,
800
- type: p.alphabetical,
800
+ type: i.alphabetical,
801
801
  "ignore-case": !1,
802
- order: g.asc,
802
+ order: c.asc,
803
803
  "custom-groups": {},
804
804
  groups: []
805
- }), l = n.members.reduce(
805
+ }), l = o.members.reduce(
806
806
  (r, e) => {
807
- var E, h, C, N;
808
- let a, i = t.sourceCode.text.slice(
807
+ var N, h, C, x;
808
+ let a, p = t.sourceCode.text.slice(
809
809
  e.range.at(0),
810
810
  e.range.at(1)
811
- ), o = (E = r.at(-1)) == null ? void 0 : E.at(-1), { getGroup: u, defineGroup: y, setCustomGroups: m } = G(
811
+ ), n = (N = r.at(-1)) == null ? void 0 : N.at(-1), { getGroup: u, defineGroup: y, setCustomGroups: m } = M(
812
812
  s.groups
813
- ), c = (P) => P.replace(/(,|;)$/, "");
813
+ ), f = (S) => S.replace(/(,|;)$/, "");
814
814
  if (e.type === "TSPropertySignature")
815
815
  e.key.type === "Identifier" ? { name: a } = e.key : e.key.type === "Literal" ? a = `${e.key.value}` : a = t.sourceCode.text.slice(
816
816
  e.range.at(0),
817
817
  (h = e.typeAnnotation) == null ? void 0 : h.range.at(0)
818
818
  );
819
819
  else if (e.type === "TSIndexSignature") {
820
- let P = ((C = e.typeAnnotation) == null ? void 0 : C.range.at(0)) ?? e.range.at(1);
821
- a = c(
822
- t.sourceCode.text.slice(e.range.at(0), P)
820
+ let S = ((C = e.typeAnnotation) == null ? void 0 : C.range.at(0)) ?? e.range.at(1);
821
+ a = f(
822
+ t.sourceCode.text.slice(e.range.at(0), S)
823
823
  );
824
824
  } else
825
- a = c(
825
+ a = f(
826
826
  t.sourceCode.text.slice(
827
827
  e.range.at(0),
828
828
  e.range.at(1)
829
829
  )
830
830
  );
831
831
  m(s["custom-groups"], a), e.loc.start.line !== e.loc.end.line && y("multiline");
832
- let f = i.endsWith(";") || i.endsWith(",") ? 1 : 0, b = {
833
- size: v(e.range) - f,
832
+ let g = p.endsWith(";") || p.endsWith(",") ? 1 : 0, b = {
833
+ size: O(e.range) - g,
834
834
  node: e,
835
835
  name: a
836
836
  };
837
- return s["partition-by-new-line"] && o && z(t.sourceCode, o, b) && r.push([]), (N = r.at(-1)) == null || N.push({
837
+ return s["partition-by-new-line"] && n && z(t.sourceCode, n, b) && r.push([]), (x = r.at(-1)) == null || x.push({
838
838
  ...b,
839
839
  group: u()
840
840
  }), r;
@@ -842,29 +842,29 @@ const Y = "sort-object-types", xe = O({
842
842
  [[]]
843
843
  );
844
844
  for (let r of l)
845
- k(r, (e, a) => {
846
- let i = x(s.groups, e), o = x(s.groups, a);
847
- (i > o || i === o && I(S(e, a, s))) && t.report({
845
+ P(r, (e, a) => {
846
+ let p = E(s.groups, e), n = E(s.groups, a);
847
+ (p > n || p === n && j(A(e, a, s))) && t.report({
848
848
  messageId: "unexpectedObjectTypesOrder",
849
849
  data: {
850
- left: A(e.name),
851
- right: A(a.name)
850
+ left: I(e.name),
851
+ right: I(a.name)
852
852
  },
853
853
  node: a.node,
854
854
  fix: (u) => {
855
855
  let y = {};
856
- for (let c of r) {
857
- let d = x(s.groups, c);
856
+ for (let f of r) {
857
+ let d = E(s.groups, f);
858
858
  d in y ? y[d] = w(
859
- [...y[d], c],
859
+ [...y[d], f],
860
860
  s
861
- ) : y[d] = [c];
861
+ ) : y[d] = [f];
862
862
  }
863
863
  let m = [];
864
- for (let c of Object.keys(y).sort(
865
- (d, f) => Number(d) - Number(f)
864
+ for (let f of Object.keys(y).sort(
865
+ (d, g) => Number(d) - Number(g)
866
866
  ))
867
- m.push(...w(y[c], s));
867
+ m.push(...w(y[f], s));
868
868
  return L(
869
869
  u,
870
870
  r,
@@ -877,8 +877,8 @@ const Y = "sort-object-types", xe = O({
877
877
  }
878
878
  }
879
879
  })
880
- }), Z = "sort-union-types", Ee = O({
881
- name: Z,
880
+ }), F = "sort-union-types", Ce = v({
881
+ name: F,
882
882
  meta: {
883
883
  type: "suggestion",
884
884
  docs: {
@@ -891,16 +891,16 @@ const Y = "sort-object-types", xe = O({
891
891
  properties: {
892
892
  type: {
893
893
  enum: [
894
- p.alphabetical,
895
- p.natural,
896
- p["line-length"]
894
+ i.alphabetical,
895
+ i.natural,
896
+ i["line-length"]
897
897
  ],
898
- default: p.alphabetical,
898
+ default: i.alphabetical,
899
899
  type: "string"
900
900
  },
901
901
  order: {
902
- enum: [g.asc, g.desc],
903
- default: g.asc,
902
+ enum: [c.asc, c.desc],
903
+ default: c.asc,
904
904
  type: "string"
905
905
  },
906
906
  "ignore-case": {
@@ -921,50 +921,50 @@ const Y = "sort-object-types", xe = O({
921
921
  },
922
922
  defaultOptions: [
923
923
  {
924
- type: p.alphabetical,
925
- order: g.asc
924
+ type: i.alphabetical,
925
+ order: c.asc
926
926
  }
927
927
  ],
928
928
  create: (t) => ({
929
- TSUnionType: (n) => {
930
- let s = j(t.options.at(0), {
931
- type: p.alphabetical,
929
+ TSUnionType: (o) => {
930
+ let s = k(t.options.at(0), {
931
+ type: i.alphabetical,
932
932
  "nullable-last": !1,
933
933
  "ignore-case": !1,
934
- order: g.asc
935
- }), l = n.types.map((r) => ({
934
+ order: c.asc
935
+ }), l = o.types.map((r) => ({
936
936
  group: r.type === "TSNullKeyword" || r.type === "TSUndefinedKeyword" ? "nullable" : "unknown",
937
937
  name: t.sourceCode.text.slice(...r.range),
938
- size: v(r.range),
938
+ size: O(r.range),
939
939
  node: r
940
940
  }));
941
- k(l, (r, e) => {
942
- let a = I(S(r, e, s));
941
+ P(l, (r, e) => {
942
+ let a = j(A(r, e, s));
943
943
  s["nullable-last"] && (r.group === "nullable" && e.group === "unknown" ? a = !0 : r.group === "unknown" && e.group === "nullable" && (a = !1)), a && t.report({
944
944
  messageId: "unexpectedUnionTypesOrder",
945
945
  data: {
946
- left: A(r.name),
947
- right: A(e.name)
946
+ left: I(r.name),
947
+ right: I(e.name)
948
948
  },
949
949
  node: e.node,
950
- fix: (i) => {
951
- let o = [];
950
+ fix: (p) => {
951
+ let n = [];
952
952
  if (s["nullable-last"]) {
953
953
  let u = [], y = l.filter((m) => m.group === "nullable" ? (u.push(m), !1) : !0);
954
- o = [
954
+ n = [
955
955
  ...w(y, s),
956
956
  ...w(u, s)
957
957
  ];
958
958
  } else
959
- o = w(l, s);
960
- return L(i, l, o, t.sourceCode);
959
+ n = w(l, s);
960
+ return L(p, l, n, t.sourceCode);
961
961
  }
962
962
  });
963
963
  });
964
964
  }
965
965
  })
966
- }), F = "sort-interfaces", Ce = O({
967
- name: F,
966
+ }), ee = "sort-interfaces", Ne = v({
967
+ name: ee,
968
968
  meta: {
969
969
  type: "suggestion",
970
970
  docs: {
@@ -980,16 +980,16 @@ const Y = "sort-object-types", xe = O({
980
980
  },
981
981
  type: {
982
982
  enum: [
983
- p.alphabetical,
984
- p.natural,
985
- p["line-length"]
983
+ i.alphabetical,
984
+ i.natural,
985
+ i["line-length"]
986
986
  ],
987
- default: p.alphabetical,
987
+ default: i.alphabetical,
988
988
  type: "string"
989
989
  },
990
990
  order: {
991
- enum: [g.asc, g.desc],
992
- default: g.asc,
991
+ enum: [c.asc, c.desc],
992
+ default: c.asc,
993
993
  type: "string"
994
994
  },
995
995
  "ignore-case": {
@@ -1020,97 +1020,97 @@ const Y = "sort-object-types", xe = O({
1020
1020
  },
1021
1021
  defaultOptions: [
1022
1022
  {
1023
- type: p.alphabetical,
1024
- order: g.asc
1023
+ type: i.alphabetical,
1024
+ order: c.asc
1025
1025
  }
1026
1026
  ],
1027
1027
  create: (t) => ({
1028
- TSInterfaceDeclaration: (n) => {
1029
- if (n.body.body.length > 1) {
1030
- let s = j(t.options.at(0), {
1028
+ TSInterfaceDeclaration: (o) => {
1029
+ if (o.body.body.length > 1) {
1030
+ let s = k(t.options.at(0), {
1031
1031
  "partition-by-new-line": !1,
1032
- type: p.alphabetical,
1032
+ type: i.alphabetical,
1033
1033
  "ignore-case": !1,
1034
- order: g.asc,
1034
+ order: c.asc,
1035
1035
  "ignore-pattern": [],
1036
1036
  "custom-groups": {},
1037
1037
  groups: []
1038
1038
  });
1039
1039
  if (!s["ignore-pattern"].some(
1040
- (l) => $(n.id.name, l, {
1040
+ (l) => $(o.id.name, l, {
1041
1041
  nocomment: !0
1042
1042
  })
1043
1043
  )) {
1044
- let l = n.body.body.reduce(
1044
+ let l = o.body.body.reduce(
1045
1045
  (r, e) => {
1046
- var c, d, f, b;
1046
+ var f, d, g, b;
1047
1047
  if (e.type === "TSCallSignatureDeclaration")
1048
1048
  return r.push([]), r;
1049
- let a = (c = r.at(-1)) == null ? void 0 : c.at(-1), i, { getGroup: o, defineGroup: u, setCustomGroups: y } = G(
1049
+ let a = (f = r.at(-1)) == null ? void 0 : f.at(-1), p, { getGroup: n, defineGroup: u, setCustomGroups: y } = M(
1050
1050
  s.groups
1051
1051
  );
1052
1052
  if (e.type === "TSPropertySignature")
1053
1053
  if (e.key.type === "Identifier")
1054
- ({ name: i } = e.key);
1054
+ ({ name: p } = e.key);
1055
1055
  else if (e.key.type === "Literal")
1056
- i = `${e.key.value}`;
1056
+ p = `${e.key.value}`;
1057
1057
  else {
1058
- let E = ((d = e.typeAnnotation) == null ? void 0 : d.range.at(0)) ?? e.range.at(1) - (e.optional ? 1 : 0);
1059
- i = t.sourceCode.text.slice(e.range.at(0), E);
1058
+ let N = ((d = e.typeAnnotation) == null ? void 0 : d.range.at(0)) ?? e.range.at(1) - (e.optional ? 1 : 0);
1059
+ p = t.sourceCode.text.slice(e.range.at(0), N);
1060
1060
  }
1061
1061
  else if (e.type === "TSIndexSignature") {
1062
- let E = ((f = e.typeAnnotation) == null ? void 0 : f.range.at(0)) ?? e.range.at(1);
1063
- i = t.sourceCode.text.slice(
1062
+ let N = ((g = e.typeAnnotation) == null ? void 0 : g.range.at(0)) ?? e.range.at(1);
1063
+ p = t.sourceCode.text.slice(
1064
1064
  e.range.at(0),
1065
- E
1065
+ N
1066
1066
  );
1067
1067
  } else {
1068
- let E = ((b = e.returnType) == null ? void 0 : b.range.at(0)) ?? e.range.at(1);
1069
- i = t.sourceCode.text.slice(
1068
+ let N = ((b = e.returnType) == null ? void 0 : b.range.at(0)) ?? e.range.at(1);
1069
+ p = t.sourceCode.text.slice(
1070
1070
  e.range.at(0),
1071
- E
1071
+ N
1072
1072
  );
1073
1073
  }
1074
1074
  let m = {
1075
- size: v(e.range),
1075
+ size: O(e.range),
1076
1076
  node: e,
1077
- name: i
1077
+ name: p
1078
1078
  };
1079
1079
  return s["partition-by-new-line"] && a && z(
1080
1080
  t.sourceCode,
1081
1081
  a,
1082
1082
  m
1083
- ) && r.push([]), y(s["custom-groups"], i), e.loc.start.line !== e.loc.end.line && u("multiline"), r.at(-1).push({
1083
+ ) && r.push([]), y(s["custom-groups"], p), e.loc.start.line !== e.loc.end.line && u("multiline"), r.at(-1).push({
1084
1084
  ...m,
1085
- group: o()
1085
+ group: n()
1086
1086
  }), r;
1087
1087
  },
1088
1088
  [[]]
1089
1089
  );
1090
1090
  for (let r of l)
1091
- k(r, (e, a) => {
1092
- let i = x(s.groups, e), o = x(s.groups, a);
1093
- (i > o || i === o && I(S(e, a, s))) && t.report({
1091
+ P(r, (e, a) => {
1092
+ let p = E(s.groups, e), n = E(s.groups, a);
1093
+ (p > n || p === n && j(A(e, a, s))) && t.report({
1094
1094
  messageId: "unexpectedInterfacePropertiesOrder",
1095
1095
  data: {
1096
- left: A(e.name),
1097
- right: A(a.name)
1096
+ left: I(e.name),
1097
+ right: I(a.name)
1098
1098
  },
1099
1099
  node: a.node,
1100
1100
  fix: (u) => {
1101
1101
  let y = {};
1102
- for (let c of r) {
1103
- let d = x(s.groups, c);
1102
+ for (let f of r) {
1103
+ let d = E(s.groups, f);
1104
1104
  d in y ? y[d] = w(
1105
- [...y[d], c],
1105
+ [...y[d], f],
1106
1106
  s
1107
- ) : y[d] = [c];
1107
+ ) : y[d] = [f];
1108
1108
  }
1109
1109
  let m = [];
1110
- for (let c of Object.keys(y).sort(
1111
- (d, f) => Number(d) - Number(f)
1110
+ for (let f of Object.keys(y).sort(
1111
+ (d, g) => Number(d) - Number(g)
1112
1112
  ))
1113
- m.push(...w(y[c], s));
1113
+ m.push(...w(y[f], s));
1114
1114
  return L(
1115
1115
  u,
1116
1116
  r,
@@ -1124,8 +1124,8 @@ const Y = "sort-object-types", xe = O({
1124
1124
  }
1125
1125
  }
1126
1126
  })
1127
- }), ee = "sort-jsx-props", Ne = O({
1128
- name: ee,
1127
+ }), te = "sort-jsx-props", we = v({
1128
+ name: te,
1129
1129
  meta: {
1130
1130
  type: "suggestion",
1131
1131
  docs: {
@@ -1141,16 +1141,16 @@ const Y = "sort-object-types", xe = O({
1141
1141
  },
1142
1142
  type: {
1143
1143
  enum: [
1144
- p.alphabetical,
1145
- p.natural,
1146
- p["line-length"]
1144
+ i.alphabetical,
1145
+ i.natural,
1146
+ i["line-length"]
1147
1147
  ],
1148
- default: p.alphabetical,
1148
+ default: i.alphabetical,
1149
1149
  type: "string"
1150
1150
  },
1151
1151
  order: {
1152
- enum: [g.asc, g.desc],
1153
- default: g.asc,
1152
+ enum: [c.asc, c.desc],
1153
+ default: c.asc,
1154
1154
  type: "string"
1155
1155
  },
1156
1156
  groups: {
@@ -1170,30 +1170,30 @@ const Y = "sort-object-types", xe = O({
1170
1170
  },
1171
1171
  defaultOptions: [
1172
1172
  {
1173
- type: p.alphabetical,
1174
- order: g.asc
1173
+ type: i.alphabetical,
1174
+ order: c.asc
1175
1175
  }
1176
1176
  ],
1177
- create: (t) => [".svelte", ".astro", ".vue"].includes(B.extname(t.filename)) ? {} : {
1178
- JSXElement: (n) => {
1179
- if (n.openingElement.attributes.length > 1) {
1180
- let s = j(t.options.at(0), {
1181
- type: p.alphabetical,
1177
+ create: (t) => [".svelte", ".astro", ".vue"].includes(_.extname(t.filename)) ? {} : {
1178
+ JSXElement: (o) => {
1179
+ if (o.openingElement.attributes.length > 1) {
1180
+ let s = k(t.options.at(0), {
1181
+ type: i.alphabetical,
1182
1182
  "ignore-case": !1,
1183
- order: g.asc,
1183
+ order: c.asc,
1184
1184
  "custom-groups": {},
1185
1185
  groups: []
1186
- }), l = n.openingElement.attributes.reduce(
1186
+ }), l = o.openingElement.attributes.reduce(
1187
1187
  (r, e) => {
1188
1188
  if (e.type === "JSXSpreadAttribute")
1189
1189
  return r.push([]), r;
1190
- let a = e.name.type === "JSXNamespacedName" ? `${e.name.namespace.name}:${e.name.name.name}` : e.name.name, { getGroup: i, defineGroup: o, setCustomGroups: u } = G(
1190
+ let a = e.name.type === "JSXNamespacedName" ? `${e.name.namespace.name}:${e.name.name.name}` : e.name.name, { getGroup: p, defineGroup: n, setCustomGroups: u } = M(
1191
1191
  s.groups
1192
1192
  );
1193
- u(s["custom-groups"], a), e.value === null && o("shorthand"), e.loc.start.line !== e.loc.end.line && o("multiline");
1193
+ u(s["custom-groups"], a), e.value === null && n("shorthand"), e.loc.start.line !== e.loc.end.line && n("multiline");
1194
1194
  let y = {
1195
- size: v(e.range),
1196
- group: i(),
1195
+ size: O(e.range),
1196
+ group: p(),
1197
1197
  node: e,
1198
1198
  name: a
1199
1199
  };
@@ -1202,9 +1202,9 @@ const Y = "sort-object-types", xe = O({
1202
1202
  [[]]
1203
1203
  );
1204
1204
  for (let r of l)
1205
- k(r, (e, a) => {
1206
- let i = x(s.groups, e), o = x(s.groups, a);
1207
- (i > o || i === o && I(S(e, a, s))) && t.report({
1205
+ P(r, (e, a) => {
1206
+ let p = E(s.groups, e), n = E(s.groups, a);
1207
+ (p > n || p === n && j(A(e, a, s))) && t.report({
1208
1208
  messageId: "unexpectedJSXPropsOrder",
1209
1209
  data: {
1210
1210
  left: e.name,
@@ -1213,18 +1213,18 @@ const Y = "sort-object-types", xe = O({
1213
1213
  node: a.node,
1214
1214
  fix: (u) => {
1215
1215
  let y = {};
1216
- for (let c of r) {
1217
- let d = x(s.groups, c);
1216
+ for (let f of r) {
1217
+ let d = E(s.groups, f);
1218
1218
  d in y ? y[d] = w(
1219
- [...y[d], c],
1219
+ [...y[d], f],
1220
1220
  s
1221
- ) : y[d] = [c];
1221
+ ) : y[d] = [f];
1222
1222
  }
1223
1223
  let m = [];
1224
- for (let c of Object.keys(y).sort(
1225
- (d, f) => Number(d) - Number(f)
1224
+ for (let f of Object.keys(y).sort(
1225
+ (d, g) => Number(d) - Number(g)
1226
1226
  ))
1227
- m.push(...w(y[c], s));
1227
+ m.push(...w(y[f], s));
1228
1228
  return L(
1229
1229
  u,
1230
1230
  r,
@@ -1237,8 +1237,8 @@ const Y = "sort-object-types", xe = O({
1237
1237
  }
1238
1238
  }
1239
1239
  }
1240
- }), te = "sort-exports", we = O({
1241
- name: te,
1240
+ }), re = "sort-exports", Se = v({
1241
+ name: re,
1242
1242
  meta: {
1243
1243
  type: "suggestion",
1244
1244
  docs: {
@@ -1251,16 +1251,16 @@ const Y = "sort-object-types", xe = O({
1251
1251
  properties: {
1252
1252
  type: {
1253
1253
  enum: [
1254
- p.alphabetical,
1255
- p.natural,
1256
- p["line-length"]
1254
+ i.alphabetical,
1255
+ i.natural,
1256
+ i["line-length"]
1257
1257
  ],
1258
- default: p.alphabetical,
1258
+ default: i.alphabetical,
1259
1259
  type: "string"
1260
1260
  },
1261
1261
  order: {
1262
- enum: [g.asc, g.desc],
1263
- default: g.asc,
1262
+ enum: [c.asc, c.desc],
1263
+ default: c.asc,
1264
1264
  type: "string"
1265
1265
  },
1266
1266
  "ignore-case": {
@@ -1277,18 +1277,18 @@ const Y = "sort-object-types", xe = O({
1277
1277
  },
1278
1278
  defaultOptions: [
1279
1279
  {
1280
- type: p.alphabetical,
1281
- order: g.asc
1280
+ type: i.alphabetical,
1281
+ order: c.asc
1282
1282
  }
1283
1283
  ],
1284
1284
  create: (t) => {
1285
- let n = j(t.options.at(0), {
1286
- type: p.alphabetical,
1287
- order: g.asc,
1285
+ let o = k(t.options.at(0), {
1286
+ type: i.alphabetical,
1287
+ order: c.asc,
1288
1288
  "ignore-case": !1
1289
1289
  }), s = [[]], l = (r) => {
1290
1290
  r.type === "ExportAllDeclaration" && r.exported === null ? s.push([]) : s.at(-1).push({
1291
- size: v(r.range),
1291
+ size: O(r.range),
1292
1292
  name: r.source.value,
1293
1293
  node: r
1294
1294
  });
@@ -1300,18 +1300,18 @@ const Y = "sort-object-types", xe = O({
1300
1300
  },
1301
1301
  "Program:exit": () => {
1302
1302
  for (let r of s)
1303
- k(r, (e, a) => {
1304
- I(S(e, a, n)) && t.report({
1303
+ P(r, (e, a) => {
1304
+ j(A(e, a, o)) && t.report({
1305
1305
  messageId: "unexpectedExportsOrder",
1306
1306
  data: {
1307
1307
  left: e.name,
1308
1308
  right: a.name
1309
1309
  },
1310
1310
  node: a.node,
1311
- fix: (i) => L(
1312
- i,
1311
+ fix: (p) => L(
1312
+ p,
1313
1313
  r,
1314
- w(r, n),
1314
+ w(r, o),
1315
1315
  t.sourceCode
1316
1316
  )
1317
1317
  });
@@ -1319,8 +1319,8 @@ const Y = "sort-object-types", xe = O({
1319
1319
  }
1320
1320
  };
1321
1321
  }
1322
- }), re = "sort-imports", Se = O({
1323
- name: re,
1322
+ }), se = "sort-imports", Ae = v({
1323
+ name: se,
1324
1324
  meta: {
1325
1325
  type: "suggestion",
1326
1326
  docs: {
@@ -1346,16 +1346,16 @@ const Y = "sort-object-types", xe = O({
1346
1346
  },
1347
1347
  type: {
1348
1348
  enum: [
1349
- p.alphabetical,
1350
- p.natural,
1351
- p["line-length"]
1349
+ i.alphabetical,
1350
+ i.natural,
1351
+ i["line-length"]
1352
1352
  ],
1353
- default: p.alphabetical,
1353
+ default: i.alphabetical,
1354
1354
  type: "string"
1355
1355
  },
1356
1356
  order: {
1357
- enum: [g.asc, g.desc],
1358
- default: g.asc,
1357
+ enum: [c.asc, c.desc],
1358
+ default: c.asc,
1359
1359
  type: "string"
1360
1360
  },
1361
1361
  "ignore-case": {
@@ -1398,7 +1398,7 @@ const Y = "sort-object-types", xe = O({
1398
1398
  definitions: {
1399
1399
  "is-line-length": {
1400
1400
  properties: {
1401
- type: { enum: [p["line-length"]], type: "string" }
1401
+ type: { enum: [i["line-length"]], type: "string" }
1402
1402
  },
1403
1403
  required: ["type"],
1404
1404
  type: "object"
@@ -1423,31 +1423,31 @@ const Y = "sort-object-types", xe = O({
1423
1423
  },
1424
1424
  defaultOptions: [
1425
1425
  {
1426
- type: p.alphabetical,
1427
- order: g.asc
1426
+ type: i.alphabetical,
1427
+ order: c.asc
1428
1428
  }
1429
1429
  ],
1430
1430
  create: (t) => {
1431
- let n = j(t.options.at(0), {
1431
+ let o = k(t.options.at(0), {
1432
1432
  "newlines-between": "always",
1433
1433
  "custom-groups": { type: {}, value: {} },
1434
1434
  "internal-pattern": ["~/**"],
1435
- type: p.alphabetical,
1436
- order: g.asc,
1435
+ type: i.alphabetical,
1436
+ order: c.asc,
1437
1437
  "ignore-case": !1,
1438
1438
  groups: []
1439
1439
  }), s = !1;
1440
- for (let o of n.groups)
1441
- if (Array.isArray(o))
1442
- for (let u of o)
1440
+ for (let n of o.groups)
1441
+ if (Array.isArray(n))
1442
+ for (let u of n)
1443
1443
  u === "unknown" && (s = !0);
1444
1444
  else
1445
- o === "unknown" && (s = !0);
1446
- s || (n.groups = [...n.groups, "unknown"]);
1447
- let l = [], r = (o) => o.type === "ImportDeclaration" && o.specifiers.length === 0, e = (o) => {
1448
- let u = (N) => [".less", ".scss", ".sass", ".styl", ".pcss", ".css", ".sss"].some(
1449
- (P) => N.endsWith(P)
1450
- ), y = (N) => [
1445
+ n === "unknown" && (s = !0);
1446
+ s || (o.groups = [...o.groups, "unknown"]);
1447
+ let l = [], r = (n) => n.type === "ImportDeclaration" && n.specifiers.length === 0, e = (n) => {
1448
+ let u = (x) => [".less", ".scss", ".sass", ".styl", ".pcss", ".css", ".sss"].some(
1449
+ (S) => x.endsWith(S)
1450
+ ), y = (x) => [
1451
1451
  "./index.d.js",
1452
1452
  "./index.d.ts",
1453
1453
  "./index.js",
@@ -1455,12 +1455,12 @@ const Y = "sort-object-types", xe = O({
1455
1455
  "./index",
1456
1456
  "./",
1457
1457
  "."
1458
- ].includes(N), m = (N) => N.indexOf("..") === 0, c = (N) => N.indexOf("./") === 0, { getGroup: d, defineGroup: f, setCustomGroups: b } = G(n.groups), E = (N) => n["internal-pattern"].length && n["internal-pattern"].some(
1459
- (P) => $(N.source.value, P, {
1458
+ ].includes(x), m = (x) => x.indexOf("..") === 0, f = (x) => x.indexOf("./") === 0, { getGroup: d, defineGroup: g, setCustomGroups: b } = M(o.groups), N = (x) => o["internal-pattern"].length && o["internal-pattern"].some(
1459
+ (S) => $(x.source.value, S, {
1460
1460
  nocomment: !0
1461
1461
  })
1462
- ), h = (N) => {
1463
- let P = [
1462
+ ), h = (x) => {
1463
+ let S = [
1464
1464
  "bun",
1465
1465
  "bun:ffi",
1466
1466
  "bun:jsc",
@@ -1471,71 +1471,71 @@ const Y = "sort-object-types", xe = O({
1471
1471
  "undici",
1472
1472
  "ws"
1473
1473
  ];
1474
- return de.includes(
1475
- N.startsWith("node:") ? N.split("node:")[1] : N
1476
- ) || P.includes(N);
1477
- }, C = (N) => !(N.startsWith(".") || N.startsWith("/"));
1478
- return o.importKind === "type" && (o.type === "ImportDeclaration" && (b(n["custom-groups"].type, o.source.value), y(o.source.value) && f("index-type"), c(o.source.value) && f("sibling-type"), m(o.source.value) && f("parent-type"), E(o) && f("internal-type"), h(o.source.value) && f("builtin-type"), C(o.source.value) && f("external-type")), f("type")), o.type === "ImportDeclaration" && (b(n["custom-groups"].value, o.source.value), r(o) && u(o.source.value) && f("side-effect-style"), r(o) && f("side-effect"), u(o.source.value) && f("style"), y(o.source.value) && f("index"), c(o.source.value) && f("sibling"), m(o.source.value) && f("parent"), E(o) && f("internal"), h(o.source.value) && f("builtin"), C(o.source.value) && f("external")), d();
1479
- }, a = (o) => o.specifiers.length > 1, i = (o) => {
1474
+ return ce.includes(
1475
+ x.startsWith("node:") ? x.split("node:")[1] : x
1476
+ ) || S.includes(x);
1477
+ }, C = (x) => !(x.startsWith(".") || x.startsWith("/"));
1478
+ return n.importKind === "type" && (n.type === "ImportDeclaration" && (b(o["custom-groups"].type, n.source.value), y(n.source.value) && g("index-type"), f(n.source.value) && g("sibling-type"), m(n.source.value) && g("parent-type"), N(n) && g("internal-type"), h(n.source.value) && g("builtin-type"), C(n.source.value) && g("external-type")), g("type")), n.type === "ImportDeclaration" && (b(o["custom-groups"].value, n.source.value), r(n) && u(n.source.value) && g("side-effect-style"), r(n) && g("side-effect"), u(n.source.value) && g("style"), y(n.source.value) && g("index"), f(n.source.value) && g("sibling"), m(n.source.value) && g("parent"), N(n) && g("internal"), h(n.source.value) && g("builtin"), C(n.source.value) && g("external")), d();
1479
+ }, a = (n) => n.specifiers.length > 1, p = (n) => {
1480
1480
  let u;
1481
- o.type === "ImportDeclaration" ? u = o.source.value : o.moduleReference.type === "TSExternalModuleReference" && o.moduleReference.expression.type === "Literal" ? u = `${o.moduleReference.expression.value}` : u = t.sourceCode.text.slice(...o.moduleReference.range), l.push({
1482
- size: v(o.range),
1483
- group: e(o),
1481
+ n.type === "ImportDeclaration" ? u = n.source.value : n.moduleReference.type === "TSExternalModuleReference" && n.moduleReference.expression.type === "Literal" ? u = `${n.moduleReference.expression.value}` : u = t.sourceCode.text.slice(...n.moduleReference.range), l.push({
1482
+ size: O(n.range),
1483
+ group: e(n),
1484
1484
  name: u,
1485
- node: o,
1486
- ...n.type === p["line-length"] && n["max-line-length"] && {
1485
+ node: n,
1486
+ ...o.type === i["line-length"] && o["max-line-length"] && {
1487
1487
  hasMultipleImportDeclarations: a(
1488
- o
1488
+ n
1489
1489
  )
1490
1490
  }
1491
1491
  });
1492
1492
  };
1493
1493
  return {
1494
- TSImportEqualsDeclaration: i,
1495
- ImportDeclaration: i,
1494
+ TSImportEqualsDeclaration: p,
1495
+ ImportDeclaration: p,
1496
1496
  "Program:exit": () => {
1497
1497
  var m;
1498
- let o = (c, d) => !!t.sourceCode.getTokensBetween(
1499
- c.node,
1500
- V(d.node, t.sourceCode) || d.node,
1498
+ let n = (f, d) => !!t.sourceCode.getTokensBetween(
1499
+ f.node,
1500
+ J(d.node, t.sourceCode) || d.node,
1501
1501
  {
1502
1502
  includeComments: !0
1503
1503
  }
1504
- ).length, u = (c, d) => {
1505
- let f = [], b = {};
1504
+ ).length, u = (f, d) => {
1505
+ let g = [], b = {};
1506
1506
  for (let h of d) {
1507
- let C = x(n.groups, h);
1507
+ let C = E(o.groups, h);
1508
1508
  C in b ? b[C] = w(
1509
1509
  [...b[C], h],
1510
- n
1510
+ o
1511
1511
  ) : b[C] = [h];
1512
1512
  }
1513
- let E = Object.keys(b).sort((h, C) => Number(h) - Number(C)).reduce(
1513
+ let N = Object.keys(b).sort((h, C) => Number(h) - Number(C)).reduce(
1514
1514
  (h, C) => [
1515
1515
  ...h,
1516
1516
  ...b[C]
1517
1517
  ],
1518
1518
  []
1519
1519
  );
1520
- for (let h = 0, C = E.length; h < C; h++) {
1521
- let N = E.at(h);
1522
- if (f.push(
1523
- c.replaceTextRange(
1520
+ for (let h = 0, C = N.length; h < C; h++) {
1521
+ let x = N.at(h);
1522
+ if (g.push(
1523
+ f.replaceTextRange(
1524
1524
  T(d.at(h).node, t.sourceCode),
1525
1525
  t.sourceCode.text.slice(
1526
- ...T(N.node, t.sourceCode)
1526
+ ...T(x.node, t.sourceCode)
1527
1527
  )
1528
1528
  )
1529
- ), n["newlines-between"] !== "ignore") {
1530
- let P = E.at(h + 1);
1531
- if (P) {
1532
- let M = z(
1529
+ ), o["newlines-between"] !== "ignore") {
1530
+ let S = N.at(h + 1);
1531
+ if (S) {
1532
+ let G = z(
1533
1533
  t.sourceCode,
1534
1534
  d.at(h),
1535
1535
  d.at(h + 1)
1536
1536
  );
1537
- (n["newlines-between"] === "always" && x(n.groups, N) === x(n.groups, P) && M !== 0 || n["newlines-between"] === "never" && M > 0) && f.push(
1538
- c.removeRange([
1537
+ (o["newlines-between"] === "always" && E(o.groups, x) === E(o.groups, S) && G !== 0 || o["newlines-between"] === "never" && G > 0) && g.push(
1538
+ f.removeRange([
1539
1539
  T(
1540
1540
  d.at(h).node,
1541
1541
  t.sourceCode
@@ -1545,8 +1545,8 @@ const Y = "sort-object-types", xe = O({
1545
1545
  t.sourceCode
1546
1546
  ).at(0) - 1
1547
1547
  ])
1548
- ), n["newlines-between"] === "always" && x(n.groups, N) !== x(n.groups, P) && M > 1 && f.push(
1549
- c.replaceTextRange(
1548
+ ), o["newlines-between"] === "always" && E(o.groups, x) !== E(o.groups, S) && G > 1 && g.push(
1549
+ f.replaceTextRange(
1550
1550
  [
1551
1551
  T(
1552
1552
  d.at(h).node,
@@ -1560,8 +1560,8 @@ const Y = "sort-object-types", xe = O({
1560
1560
  `
1561
1561
  `
1562
1562
  )
1563
- ), n["newlines-between"] === "always" && x(n.groups, N) !== x(n.groups, P) && M === 0 && f.push(
1564
- c.insertTextAfterRange(
1563
+ ), o["newlines-between"] === "always" && E(o.groups, x) !== E(o.groups, S) && G === 0 && g.push(
1564
+ f.insertTextAfterRange(
1565
1565
  T(d.at(h).node, t.sourceCode),
1566
1566
  `
1567
1567
  `
@@ -1570,58 +1570,58 @@ const Y = "sort-object-types", xe = O({
1570
1570
  }
1571
1571
  }
1572
1572
  }
1573
- return f;
1573
+ return g;
1574
1574
  }, y = [[]];
1575
- for (let c of l) {
1575
+ for (let f of l) {
1576
1576
  let d = (m = y.at(-1)) == null ? void 0 : m.at(-1);
1577
- d && o(d, c) ? y.push([c]) : y.at(-1).push(c);
1577
+ d && n(d, f) ? y.push([f]) : y.at(-1).push(f);
1578
1578
  }
1579
- for (let c of y)
1580
- k(c, (d, f) => {
1581
- let b = x(n.groups, d), E = x(n.groups, f), h = z(
1579
+ for (let f of y)
1580
+ P(f, (d, g) => {
1581
+ let b = E(o.groups, d), N = E(o.groups, g), h = z(
1582
1582
  t.sourceCode,
1583
1583
  d,
1584
- f
1584
+ g
1585
1585
  );
1586
- !(r(d.node) && r(f.node)) && !o(d, f) && (b > E || b === E && I(S(d, f, n))) && t.report({
1586
+ !(r(d.node) && r(g.node)) && !n(d, g) && (b > N || b === N && j(A(d, g, o))) && t.report({
1587
1587
  messageId: "unexpectedImportsOrder",
1588
1588
  data: {
1589
1589
  left: d.name,
1590
- right: f.name
1590
+ right: g.name
1591
1591
  },
1592
- node: f.node,
1593
- fix: (C) => u(C, c)
1594
- }), n["newlines-between"] === "never" && h > 0 && t.report({
1592
+ node: g.node,
1593
+ fix: (C) => u(C, f)
1594
+ }), o["newlines-between"] === "never" && h > 0 && t.report({
1595
1595
  messageId: "extraSpacingBetweenImports",
1596
1596
  data: {
1597
1597
  left: d.name,
1598
- right: f.name
1598
+ right: g.name
1599
1599
  },
1600
- node: f.node,
1601
- fix: (C) => u(C, c)
1602
- }), n["newlines-between"] === "always" && (b < E && h === 0 ? t.report({
1600
+ node: g.node,
1601
+ fix: (C) => u(C, f)
1602
+ }), o["newlines-between"] === "always" && (b < N && h === 0 ? t.report({
1603
1603
  messageId: "missedSpacingBetweenImports",
1604
1604
  data: {
1605
1605
  left: d.name,
1606
- right: f.name
1606
+ right: g.name
1607
1607
  },
1608
- node: f.node,
1609
- fix: (C) => u(C, c)
1610
- }) : (h > 1 || b === E && h > 0) && t.report({
1608
+ node: g.node,
1609
+ fix: (C) => u(C, f)
1610
+ }) : (h > 1 || b === N && h > 0) && t.report({
1611
1611
  messageId: "extraSpacingBetweenImports",
1612
1612
  data: {
1613
1613
  left: d.name,
1614
- right: f.name
1614
+ right: g.name
1615
1615
  },
1616
- node: f.node,
1617
- fix: (C) => u(C, c)
1616
+ node: g.node,
1617
+ fix: (C) => u(C, f)
1618
1618
  }));
1619
1619
  });
1620
1620
  }
1621
1621
  };
1622
1622
  }
1623
- }), se = "sort-objects", Ae = O({
1624
- name: se,
1623
+ }), ae = "sort-objects", Ie = v({
1624
+ name: ae,
1625
1625
  meta: {
1626
1626
  type: "suggestion",
1627
1627
  docs: {
@@ -1649,22 +1649,28 @@ const Y = "sort-object-types", xe = O({
1649
1649
  },
1650
1650
  type: {
1651
1651
  enum: [
1652
- p.alphabetical,
1653
- p.natural,
1654
- p["line-length"]
1652
+ i.alphabetical,
1653
+ i.natural,
1654
+ i["line-length"]
1655
1655
  ],
1656
- default: p.alphabetical,
1656
+ default: i.alphabetical,
1657
1657
  type: "string"
1658
1658
  },
1659
1659
  order: {
1660
- enum: [g.asc, g.desc],
1661
- default: g.asc,
1660
+ enum: [c.asc, c.desc],
1661
+ default: c.asc,
1662
1662
  type: "string"
1663
1663
  },
1664
1664
  "ignore-case": {
1665
1665
  type: "boolean",
1666
1666
  default: !1
1667
1667
  },
1668
+ "ignore-pattern": {
1669
+ items: {
1670
+ type: "string"
1671
+ },
1672
+ type: "array"
1673
+ },
1668
1674
  groups: {
1669
1675
  type: "array"
1670
1676
  }
@@ -1678,45 +1684,51 @@ const Y = "sort-object-types", xe = O({
1678
1684
  },
1679
1685
  defaultOptions: [
1680
1686
  {
1681
- type: p.alphabetical,
1682
- order: g.asc
1687
+ type: i.alphabetical,
1688
+ order: c.asc
1683
1689
  }
1684
1690
  ],
1685
1691
  create: (t) => {
1686
- let n = (s) => {
1687
- if (s.properties.length > 1) {
1688
- let l = j(t.options.at(0), {
1689
- "partition-by-new-line": !1,
1690
- "partition-by-comment": !1,
1691
- type: p.alphabetical,
1692
- "styled-components": !0,
1693
- "ignore-case": !1,
1694
- order: g.asc,
1695
- "custom-groups": {},
1696
- groups: []
1697
- }), r = (i) => i.type === "Identifier" && i.name === "styled", e = (i) => i !== void 0 && i.type === "CallExpression" && (i.callee.type === "MemberExpression" && r(i.callee.object) || i.callee.type === "CallExpression" && r(i.callee.callee));
1698
- if (!l["styled-components"] && (e(s.parent) || s.parent.type === "ArrowFunctionExpression" && e(s.parent.parent)))
1692
+ let o = (s) => {
1693
+ let l = k(t.options.at(0), {
1694
+ "partition-by-new-line": !1,
1695
+ "partition-by-comment": !1,
1696
+ type: i.alphabetical,
1697
+ "styled-components": !0,
1698
+ "ignore-case": !1,
1699
+ "ignore-pattern": [],
1700
+ order: c.asc,
1701
+ "custom-groups": {},
1702
+ groups: []
1703
+ }), r = s.parent.type === "VariableDeclarator" && s.parent.id.type === "Identifier" ? s.parent.id.name : null;
1704
+ if (!(l["ignore-pattern"].length && typeof r == "string" ? l["ignore-pattern"].some(
1705
+ (a) => $(r, a, {
1706
+ nocomment: !0
1707
+ })
1708
+ ) : !1) && s.properties.length > 1) {
1709
+ let a = (u) => u.type === "Identifier" && u.name === "styled", p = (u) => u !== void 0 && u.type === "CallExpression" && (u.callee.type === "MemberExpression" && a(u.callee.object) || u.callee.type === "CallExpression" && a(u.callee.callee));
1710
+ if (!l["styled-components"] && (p(s.parent) || s.parent.type === "ArrowFunctionExpression" && p(s.parent.parent)))
1699
1711
  return;
1700
- let a = (i) => i.reduce(
1701
- (o, u) => {
1702
- var N;
1703
- if (u.type === "SpreadElement" || u.type === "RestElement")
1704
- return o.push([]), o;
1705
- let y = V(u, t.sourceCode), m = (N = o.at(-1)) == null ? void 0 : N.at(-1);
1706
- l["partition-by-comment"] && y && ie(
1712
+ let n = (u) => u.reduce(
1713
+ (y, m) => {
1714
+ var G;
1715
+ if (m.type === "SpreadElement" || m.type === "RestElement")
1716
+ return y.push([]), y;
1717
+ let f = J(m, t.sourceCode), d = (G = y.at(-1)) == null ? void 0 : G.at(-1);
1718
+ l["partition-by-comment"] && f && pe(
1707
1719
  l["partition-by-comment"],
1708
- y.value
1709
- ) && o.push([]);
1710
- let c, d = "ignore", f = [], { getGroup: b, setCustomGroups: E } = G(l.groups);
1711
- u.key.type === "Identifier" ? { name: c } = u.key : u.key.type === "Literal" ? c = `${u.key.value}` : c = t.sourceCode.text.slice(...u.key.range);
1712
- let h = {
1713
- size: v(u.range),
1714
- node: u,
1715
- name: c
1720
+ f.value
1721
+ ) && y.push([]);
1722
+ let g, b = "ignore", N = [], { getGroup: h, setCustomGroups: C } = M(l.groups);
1723
+ m.key.type === "Identifier" ? { name: g } = m.key : m.key.type === "Literal" ? g = `${m.key.value}` : g = t.sourceCode.text.slice(...m.key.range);
1724
+ let x = {
1725
+ size: O(m.range),
1726
+ node: m,
1727
+ name: g
1716
1728
  };
1717
- l["partition-by-new-line"] && m && z(t.sourceCode, m, h) && o.push([]), u.value.type === "AssignmentPattern" && ((M) => {
1718
- M.right.type === "Identifier" && f.push(M.right.name);
1719
- let le = (R) => {
1729
+ l["partition-by-new-line"] && d && z(t.sourceCode, d, x) && y.push([]), m.value.type === "AssignmentPattern" && ((B) => {
1730
+ B.right.type === "Identifier" && N.push(B.right.name);
1731
+ let ie = (R) => {
1720
1732
  let D = [];
1721
1733
  switch (R.type) {
1722
1734
  case "ArrowFunctionExpression":
@@ -1734,51 +1746,51 @@ const Y = "sort-object-types", xe = O({
1734
1746
  break;
1735
1747
  }
1736
1748
  D.forEach((U) => {
1737
- U.type === "Identifier" && f.push(U.name), (U.type === "BinaryExpression" || U.type === "ConditionalExpression") && le(U);
1749
+ U.type === "Identifier" && N.push(U.name), (U.type === "BinaryExpression" || U.type === "ConditionalExpression") && ie(U);
1738
1750
  });
1739
1751
  };
1740
- switch (M.right.type) {
1752
+ switch (B.right.type) {
1741
1753
  case "ArrowFunctionExpression":
1742
1754
  case "ConditionalExpression":
1743
1755
  case "LogicalExpression":
1744
1756
  case "BinaryExpression":
1745
1757
  case "CallExpression":
1746
- le(M.right);
1758
+ ie(B.right);
1747
1759
  break;
1748
1760
  }
1749
- })(u.value), E(l["custom-groups"], c);
1750
- let C = {
1751
- ...h,
1752
- group: b(),
1753
- dependencies: f,
1754
- position: d
1761
+ })(m.value), C(l["custom-groups"], g);
1762
+ let S = {
1763
+ ...x,
1764
+ group: h(),
1765
+ dependencies: N,
1766
+ position: b
1755
1767
  };
1756
- return o.at(-1).push(C), o;
1768
+ return y.at(-1).push(S), y;
1757
1769
  },
1758
1770
  [[]]
1759
1771
  );
1760
- for (let i of a(s.properties))
1761
- k(i, (o, u) => {
1762
- let y = x(l.groups, o), m = x(l.groups, u);
1763
- if (y > m || y === m && I(S(o, u, l))) {
1764
- let c = (d) => {
1765
- let f = {};
1766
- for (let E of i) {
1767
- let h = x(l.groups, E);
1768
- h in f ? f[h] = w(
1769
- [...f[h], E],
1772
+ for (let u of n(s.properties))
1773
+ P(u, (y, m) => {
1774
+ let f = E(l.groups, y), d = E(l.groups, m);
1775
+ if (f > d || f === d && j(A(y, m, l))) {
1776
+ let g = (b) => {
1777
+ let N = {};
1778
+ for (let C of u) {
1779
+ let x = E(l.groups, C);
1780
+ x in N ? N[x] = w(
1781
+ [...N[x], C],
1770
1782
  l
1771
- ) : f[h] = [E];
1783
+ ) : N[x] = [C];
1772
1784
  }
1773
- let b = [];
1774
- for (let E of Object.keys(f).sort(
1775
- (h, C) => Number(h) - Number(C)
1785
+ let h = [];
1786
+ for (let C of Object.keys(N).sort(
1787
+ (x, S) => Number(x) - Number(S)
1776
1788
  ))
1777
- b.push(...w(f[E], l));
1789
+ h.push(...w(N[C], l));
1778
1790
  return L(
1779
- d,
1780
- i,
1781
1791
  b,
1792
+ u,
1793
+ h,
1782
1794
  t.sourceCode,
1783
1795
  {
1784
1796
  partitionComment: l["partition-by-comment"]
@@ -1788,23 +1800,23 @@ const Y = "sort-object-types", xe = O({
1788
1800
  t.report({
1789
1801
  messageId: "unexpectedObjectsOrder",
1790
1802
  data: {
1791
- left: A(o.name),
1792
- right: A(u.name)
1803
+ left: I(y.name),
1804
+ right: I(m.name)
1793
1805
  },
1794
- node: u.node,
1795
- fix: c
1806
+ node: m.node,
1807
+ fix: g
1796
1808
  });
1797
1809
  }
1798
1810
  });
1799
1811
  }
1800
1812
  };
1801
1813
  return {
1802
- ObjectExpression: n,
1803
- ObjectPattern: n
1814
+ ObjectExpression: o,
1815
+ ObjectPattern: o
1804
1816
  };
1805
1817
  }
1806
- }), ae = "sort-classes", Oe = O({
1807
- name: ae,
1818
+ }), oe = "sort-classes", ve = v({
1819
+ name: oe,
1808
1820
  meta: {
1809
1821
  type: "suggestion",
1810
1822
  docs: {
@@ -1817,11 +1829,11 @@ const Y = "sort-object-types", xe = O({
1817
1829
  properties: {
1818
1830
  type: {
1819
1831
  enum: [
1820
- p.alphabetical,
1821
- p.natural,
1822
- p["line-length"]
1832
+ i.alphabetical,
1833
+ i.natural,
1834
+ i["line-length"]
1823
1835
  ],
1824
- default: p.alphabetical,
1836
+ default: i.alphabetical,
1825
1837
  type: "string"
1826
1838
  },
1827
1839
  "ignore-case": {
@@ -1829,8 +1841,8 @@ const Y = "sort-object-types", xe = O({
1829
1841
  default: !1
1830
1842
  },
1831
1843
  order: {
1832
- enum: [g.asc, g.desc],
1833
- default: g.asc,
1844
+ enum: [c.asc, c.desc],
1845
+ default: c.asc,
1834
1846
  type: "string"
1835
1847
  },
1836
1848
  groups: {
@@ -1847,72 +1859,72 @@ const Y = "sort-object-types", xe = O({
1847
1859
  },
1848
1860
  defaultOptions: [
1849
1861
  {
1850
- type: p.alphabetical,
1851
- order: g.asc
1862
+ type: i.alphabetical,
1863
+ order: c.asc
1852
1864
  }
1853
1865
  ],
1854
1866
  create: (t) => ({
1855
- ClassBody: (n) => {
1856
- if (n.body.length > 1) {
1857
- let s = j(t.options.at(0), {
1858
- type: p.alphabetical,
1859
- order: g.asc,
1867
+ ClassBody: (o) => {
1868
+ if (o.body.length > 1) {
1869
+ let s = k(t.options.at(0), {
1870
+ type: i.alphabetical,
1871
+ order: c.asc,
1860
1872
  "ignore-case": !1,
1861
1873
  groups: ["property", "constructor", "method", "unknown"]
1862
- }), l = n.body.map((r) => {
1874
+ }), l = o.body.map((r) => {
1863
1875
  var u;
1864
- let e, { getGroup: a, defineGroup: i } = G(s.groups);
1876
+ let e, { getGroup: a, defineGroup: p } = M(s.groups);
1865
1877
  r.type === "StaticBlock" ? e = "static" : r.type === "TSIndexSignature" ? e = t.sourceCode.text.slice(
1866
1878
  r.range.at(0),
1867
1879
  ((u = r.typeAnnotation) == null ? void 0 : u.range.at(0)) ?? r.range.at(1)
1868
1880
  ) : r.key.type === "Identifier" ? { name: e } = r.key : e = t.sourceCode.text.slice(...r.key.range);
1869
- let o = e.startsWith("_") || e.startsWith("#");
1881
+ let n = e.startsWith("_") || e.startsWith("#");
1870
1882
  if (r.type === "MethodDefinition") {
1871
- r.kind === "constructor" && i("constructor");
1872
- let y = r.accessibility === "private" || o, m = r.static;
1873
- y && m && i("static-private-method"), y && i("private-method"), m && i("static-method"), r.kind === "get" && i("get-method"), r.kind === "set" && i("set-method"), i("method");
1883
+ r.kind === "constructor" && p("constructor");
1884
+ let y = r.accessibility === "private" || n, m = r.static;
1885
+ y && m && p("static-private-method"), y && p("private-method"), m && p("static-method"), r.kind === "get" && p("get-method"), r.kind === "set" && p("set-method"), p("method");
1874
1886
  } else
1875
- r.type === "TSIndexSignature" ? i("index-signature") : r.type === "PropertyDefinition" && ((r.accessibility === "private" || o) && i("private-property"), r.static && i("static-property"), i("property"));
1887
+ r.type === "TSIndexSignature" ? p("index-signature") : r.type === "PropertyDefinition" && ((r.accessibility === "private" || n) && p("private-property"), r.static && p("static-property"), p("property"));
1876
1888
  return {
1877
- size: v(r.range),
1889
+ size: O(r.range),
1878
1890
  group: a(),
1879
1891
  node: r,
1880
1892
  name: e
1881
1893
  };
1882
1894
  });
1883
- k(l, (r, e) => {
1884
- let a = x(s.groups, r), i = x(s.groups, e);
1885
- r.name !== e.name && (a > i || a === i && I(S(r, e, s))) && t.report({
1895
+ P(l, (r, e) => {
1896
+ let a = E(s.groups, r), p = E(s.groups, e);
1897
+ r.name !== e.name && (a > p || a === p && j(A(r, e, s))) && t.report({
1886
1898
  messageId: "unexpectedClassesOrder",
1887
1899
  data: {
1888
- left: A(r.name),
1889
- right: A(e.name)
1900
+ left: I(r.name),
1901
+ right: I(e.name)
1890
1902
  },
1891
1903
  node: e.node,
1892
- fix: (o) => {
1904
+ fix: (n) => {
1893
1905
  let u = [], y = l.reduce(
1894
- (c, d) => {
1895
- let f = x(s.groups, d);
1896
- return f in c ? c[f] = w(
1897
- [...c[f], d],
1906
+ (f, d) => {
1907
+ let g = E(s.groups, d);
1908
+ return g in f ? f[g] = w(
1909
+ [...f[g], d],
1898
1910
  s
1899
- ) : c[f] = [d], c;
1911
+ ) : f[g] = [d], f;
1900
1912
  },
1901
1913
  {}
1902
- ), m = Object.keys(y).sort((c, d) => Number(c) - Number(d)).reduce(
1903
- (c, d) => [
1904
- ...c,
1914
+ ), m = Object.keys(y).sort((f, d) => Number(f) - Number(d)).reduce(
1915
+ (f, d) => [
1916
+ ...f,
1905
1917
  ...y[d]
1906
1918
  ],
1907
1919
  []
1908
1920
  );
1909
- for (let c = 0, d = m.length; c < d; c++)
1921
+ for (let f = 0, d = m.length; f < d; f++)
1910
1922
  u.push(
1911
- o.replaceTextRange(
1912
- T(l.at(c).node, t.sourceCode),
1923
+ n.replaceTextRange(
1924
+ T(l.at(f).node, t.sourceCode),
1913
1925
  t.sourceCode.text.slice(
1914
1926
  ...T(
1915
- m.at(c).node,
1927
+ m.at(f).node,
1916
1928
  t.sourceCode
1917
1929
  )
1918
1930
  )
@@ -1925,8 +1937,8 @@ const Y = "sort-object-types", xe = O({
1925
1937
  }
1926
1938
  }
1927
1939
  })
1928
- }), oe = "sort-enums", ve = O({
1929
- name: oe,
1940
+ }), ne = "sort-enums", Oe = v({
1941
+ name: ne,
1930
1942
  meta: {
1931
1943
  type: "suggestion",
1932
1944
  docs: {
@@ -1939,11 +1951,11 @@ const Y = "sort-object-types", xe = O({
1939
1951
  properties: {
1940
1952
  type: {
1941
1953
  enum: [
1942
- p.alphabetical,
1943
- p.natural,
1944
- p["line-length"]
1954
+ i.alphabetical,
1955
+ i.natural,
1956
+ i["line-length"]
1945
1957
  ],
1946
- default: p.alphabetical,
1958
+ default: i.alphabetical,
1947
1959
  type: "string"
1948
1960
  },
1949
1961
  "ignore-case": {
@@ -1951,8 +1963,8 @@ const Y = "sort-object-types", xe = O({
1951
1963
  default: !1
1952
1964
  },
1953
1965
  order: {
1954
- enum: [g.asc, g.desc],
1955
- default: g.asc,
1966
+ enum: [c.asc, c.desc],
1967
+ default: c.asc,
1956
1968
  type: "string"
1957
1969
  }
1958
1970
  },
@@ -1965,28 +1977,28 @@ const Y = "sort-object-types", xe = O({
1965
1977
  },
1966
1978
  defaultOptions: [
1967
1979
  {
1968
- type: p.alphabetical,
1969
- order: g.asc
1980
+ type: i.alphabetical,
1981
+ order: c.asc
1970
1982
  }
1971
1983
  ],
1972
1984
  create: (t) => ({
1973
- TSEnumDeclaration: (n) => {
1974
- if (n.members.length > 1 && n.members.every(({ initializer: s }) => s)) {
1975
- let s = j(t.options.at(0), {
1976
- type: p.alphabetical,
1977
- order: g.asc,
1985
+ TSEnumDeclaration: (o) => {
1986
+ if (o.members.length > 1 && o.members.every(({ initializer: s }) => s)) {
1987
+ let s = k(t.options.at(0), {
1988
+ type: i.alphabetical,
1989
+ order: c.asc,
1978
1990
  "ignore-case": !1
1979
- }), l = n.members.map((r) => ({
1991
+ }), l = o.members.map((r) => ({
1980
1992
  name: r.id.type === "Literal" ? `${r.id.value}` : `${t.sourceCode.text.slice(...r.id.range)}`,
1981
- size: v(r.range),
1993
+ size: O(r.range),
1982
1994
  node: r
1983
1995
  }));
1984
- k(l, (r, e) => {
1985
- I(S(r, e, s)) && t.report({
1996
+ P(l, (r, e) => {
1997
+ j(A(r, e, s)) && t.report({
1986
1998
  messageId: "unexpectedEnumsOrder",
1987
1999
  data: {
1988
- left: A(r.name),
1989
- right: A(e.name)
2000
+ left: I(r.name),
2001
+ right: I(e.name)
1990
2002
  },
1991
2003
  node: e.node,
1992
2004
  fix: (a) => L(
@@ -2000,8 +2012,8 @@ const Y = "sort-object-types", xe = O({
2000
2012
  }
2001
2013
  }
2002
2014
  })
2003
- }), ne = "sort-maps", Ie = O({
2004
- name: ne,
2015
+ }), le = "sort-maps", je = v({
2016
+ name: le,
2005
2017
  meta: {
2006
2018
  type: "suggestion",
2007
2019
  docs: {
@@ -2014,16 +2026,16 @@ const Y = "sort-object-types", xe = O({
2014
2026
  properties: {
2015
2027
  type: {
2016
2028
  enum: [
2017
- p.alphabetical,
2018
- p.natural,
2019
- p["line-length"]
2029
+ i.alphabetical,
2030
+ i.natural,
2031
+ i["line-length"]
2020
2032
  ],
2021
- default: p.alphabetical,
2033
+ default: i.alphabetical,
2022
2034
  type: "string"
2023
2035
  },
2024
2036
  order: {
2025
- enum: [g.asc, g.desc],
2026
- default: g.asc,
2037
+ enum: [c.asc, c.desc],
2038
+ default: c.asc,
2027
2039
  type: "string"
2028
2040
  },
2029
2041
  "ignore-case": {
@@ -2040,45 +2052,45 @@ const Y = "sort-object-types", xe = O({
2040
2052
  },
2041
2053
  defaultOptions: [
2042
2054
  {
2043
- type: p.alphabetical,
2044
- order: g.asc
2055
+ type: i.alphabetical,
2056
+ order: c.asc
2045
2057
  }
2046
2058
  ],
2047
2059
  create: (t) => ({
2048
- NewExpression: (n) => {
2049
- if (n.callee.type === "Identifier" && n.callee.name === "Map" && n.arguments.length && n.arguments[0].type === "ArrayExpression") {
2050
- let [{ elements: s }] = n.arguments;
2060
+ NewExpression: (o) => {
2061
+ if (o.callee.type === "Identifier" && o.callee.name === "Map" && o.arguments.length && o.arguments[0].type === "ArrayExpression") {
2062
+ let [{ elements: s }] = o.arguments;
2051
2063
  if (s.length > 1) {
2052
- let l = j(t.options.at(0), {
2053
- type: p.alphabetical,
2064
+ let l = k(t.options.at(0), {
2065
+ type: i.alphabetical,
2054
2066
  "ignore-case": !1,
2055
- order: g.asc
2067
+ order: c.asc
2056
2068
  }), r = s.reduce(
2057
2069
  (e, a) => (a === null || a.type === "SpreadElement" ? e.push([]) : e.at(-1).push(a), e),
2058
2070
  [[]]
2059
2071
  );
2060
2072
  for (let e of r) {
2061
- let a = e.map((i) => {
2062
- let o;
2063
- if (i.type === "ArrayExpression") {
2064
- let [u] = i.elements;
2065
- u ? u.type === "Literal" ? o = u.raw : o = t.sourceCode.text.slice(...u.range) : o = `${u}`;
2073
+ let a = e.map((p) => {
2074
+ let n;
2075
+ if (p.type === "ArrayExpression") {
2076
+ let [u] = p.elements;
2077
+ u ? u.type === "Literal" ? n = u.raw : n = t.sourceCode.text.slice(...u.range) : n = `${u}`;
2066
2078
  } else
2067
- o = t.sourceCode.text.slice(...i.range);
2079
+ n = t.sourceCode.text.slice(...p.range);
2068
2080
  return {
2069
- size: v(i.range),
2070
- node: i,
2071
- name: o
2081
+ size: O(p.range),
2082
+ node: p,
2083
+ name: n
2072
2084
  };
2073
2085
  });
2074
- k(a, (i, o) => {
2075
- I(S(i, o, l)) && t.report({
2086
+ P(a, (p, n) => {
2087
+ j(A(p, n, l)) && t.report({
2076
2088
  messageId: "unexpectedMapElementsOrder",
2077
2089
  data: {
2078
- left: A(i.name),
2079
- right: A(o.name)
2090
+ left: I(p.name),
2091
+ right: I(n.name)
2080
2092
  },
2081
- node: o.node,
2093
+ node: n.node,
2082
2094
  fix: (u) => L(
2083
2095
  u,
2084
2096
  a,
@@ -2092,10 +2104,10 @@ const Y = "sort-object-types", xe = O({
2092
2104
  }
2093
2105
  }
2094
2106
  })
2095
- }), je = "eslint-plugin-perfectionist";
2096
- let W = (t) => {
2097
- let n = {
2098
- [re]: [
2107
+ }), ke = "eslint-plugin-perfectionist";
2108
+ let V = (t) => {
2109
+ let o = {
2110
+ [se]: [
2099
2111
  "error",
2100
2112
  {
2101
2113
  groups: [
@@ -2116,7 +2128,7 @@ let W = (t) => {
2116
2128
  "internal-pattern": ["~/**"]
2117
2129
  }
2118
2130
  ],
2119
- [ae]: [
2131
+ [oe]: [
2120
2132
  "error",
2121
2133
  {
2122
2134
  groups: [
@@ -2133,21 +2145,20 @@ let W = (t) => {
2133
2145
  ]
2134
2146
  }
2135
2147
  ],
2136
- [se]: [
2148
+ [ae]: [
2137
2149
  "error",
2138
2150
  {
2139
2151
  "partition-by-comment": !1
2140
2152
  }
2141
2153
  ],
2142
- [q]: [
2154
+ [K]: [
2143
2155
  "error",
2144
2156
  {
2145
2157
  "spread-last": !0
2146
2158
  }
2147
2159
  ],
2148
- [J]: ["error"],
2149
2160
  [X]: ["error"],
2150
- [K]: ["error"],
2161
+ [q]: ["error"],
2151
2162
  [H]: ["error"],
2152
2163
  [Q]: ["error"],
2153
2164
  [Y]: ["error"],
@@ -2155,12 +2166,13 @@ let W = (t) => {
2155
2166
  [F]: ["error"],
2156
2167
  [ee]: ["error"],
2157
2168
  [te]: ["error"],
2158
- [oe]: ["error"],
2159
- [ne]: ["error"]
2169
+ [re]: ["error"],
2170
+ [ne]: ["error"],
2171
+ [le]: ["error"]
2160
2172
  };
2161
2173
  return {
2162
2174
  rules: Object.fromEntries(
2163
- Object.entries(n).map(([s, [l, r = {}]]) => [
2175
+ Object.entries(o).map(([s, [l, r = {}]]) => [
2164
2176
  `perfectionist/${s}`,
2165
2177
  [l, Object.assign(r, t)]
2166
2178
  ])
@@ -2168,43 +2180,43 @@ let W = (t) => {
2168
2180
  plugins: ["perfectionist"]
2169
2181
  };
2170
2182
  };
2171
- const Ge = {
2183
+ const $e = {
2172
2184
  rules: {
2185
+ [K]: me,
2173
2186
  [q]: ye,
2174
- [X]: ge,
2175
- [ae]: Oe,
2176
2187
  [oe]: ve,
2177
- [te]: we,
2188
+ [ne]: Oe,
2178
2189
  [re]: Se,
2179
- [F]: Ce,
2190
+ [se]: Ae,
2180
2191
  [ee]: Ne,
2181
- [ne]: Ie,
2182
- [H]: he,
2192
+ [te]: we,
2193
+ [le]: je,
2183
2194
  [Q]: be,
2184
2195
  [Y]: xe,
2185
- [se]: Ae,
2186
- [J]: fe,
2187
2196
  [Z]: Ee,
2188
- [K]: me
2197
+ [ae]: Ie,
2198
+ [X]: ge,
2199
+ [F]: Ce,
2200
+ [H]: he
2189
2201
  },
2190
2202
  configs: {
2191
- "recommended-alphabetical": W({
2192
- type: p.alphabetical,
2193
- order: g.asc,
2203
+ "recommended-alphabetical": V({
2204
+ type: i.alphabetical,
2205
+ order: c.asc,
2194
2206
  "ignore-case": !1
2195
2207
  }),
2196
- "recommended-natural": W({
2197
- type: p.natural,
2198
- order: g.asc,
2208
+ "recommended-natural": V({
2209
+ type: i.natural,
2210
+ order: c.asc,
2199
2211
  "ignore-case": !1
2200
2212
  }),
2201
- "recommended-line-length": W({
2202
- type: p["line-length"],
2203
- order: g.desc
2213
+ "recommended-line-length": V({
2214
+ type: i["line-length"],
2215
+ order: c.desc
2204
2216
  })
2205
2217
  },
2206
- name: je
2218
+ name: ke
2207
2219
  };
2208
2220
  export {
2209
- Ge as default
2221
+ $e as default
2210
2222
  };