@alextheman/eslint-plugin 5.12.0 → 5.13.1
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/README.md +1 -1
- package/dist/index.cjs +158 -188
- package/dist/index.d.cts +1 -6
- package/dist/index.d.ts +1 -6
- package/dist/index.js +140 -173
- package/dist/internal/index.cjs +84 -35
- package/dist/internal/index.js +82 -33
- package/dist/utility/index.cjs +11 -24
- package/dist/utility/index.js +3 -11
- package/package.json +28 -30
package/dist/internal/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
//#region \0rolldown/runtime.js
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -6,18 +6,14 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
9
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
10
10
|
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
}
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
+
key = keys[i];
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
21
17
|
}
|
|
22
18
|
return to;
|
|
23
19
|
};
|
|
@@ -25,12 +21,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
21
|
value: mod,
|
|
26
22
|
enumerable: true
|
|
27
23
|
}) : target, mod));
|
|
28
|
-
|
|
29
24
|
//#endregion
|
|
30
25
|
let typescript_eslint = require("typescript-eslint");
|
|
31
|
-
typescript_eslint = __toESM(typescript_eslint);
|
|
32
|
-
|
|
33
|
-
//#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/globals.json
|
|
26
|
+
typescript_eslint = __toESM(typescript_eslint, 1);
|
|
27
|
+
//#region node_modules/.pnpm/globals@17.5.0/node_modules/globals/globals.json
|
|
34
28
|
var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
35
29
|
module.exports = {
|
|
36
30
|
"amd": {
|
|
@@ -136,6 +130,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
136
130
|
"AudioNode": false,
|
|
137
131
|
"AudioParam": false,
|
|
138
132
|
"AudioParamMap": false,
|
|
133
|
+
"AudioPlaybackStats": false,
|
|
139
134
|
"AudioProcessingEvent": false,
|
|
140
135
|
"AudioScheduledSourceNode": false,
|
|
141
136
|
"AudioSinkInfo": false,
|
|
@@ -927,6 +922,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
927
922
|
"RTCSessionDescription": false,
|
|
928
923
|
"RTCStatsReport": false,
|
|
929
924
|
"RTCTrackEvent": false,
|
|
925
|
+
"Sanitizer": false,
|
|
930
926
|
"scheduler": false,
|
|
931
927
|
"Scheduler": false,
|
|
932
928
|
"Scheduling": false,
|
|
@@ -1128,6 +1124,9 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1128
1124
|
"TextTrackList": false,
|
|
1129
1125
|
"TextUpdateEvent": false,
|
|
1130
1126
|
"TimeEvent": false,
|
|
1127
|
+
"TimelineTrigger": false,
|
|
1128
|
+
"TimelineTriggerRange": false,
|
|
1129
|
+
"TimelineTriggerRangeList": false,
|
|
1131
1130
|
"TimeRanges": false,
|
|
1132
1131
|
"ToggleEvent": false,
|
|
1133
1132
|
"toolbar": false,
|
|
@@ -1573,6 +1572,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1573
1572
|
"PromiseRejectionEvent": false,
|
|
1574
1573
|
"prompt": false,
|
|
1575
1574
|
"queueMicrotask": false,
|
|
1575
|
+
"QuotaExceededError": false,
|
|
1576
1576
|
"ReadableByteStreamController": false,
|
|
1577
1577
|
"ReadableStream": false,
|
|
1578
1578
|
"ReadableStreamBYOBReader": false,
|
|
@@ -2363,6 +2363,70 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2363
2363
|
"WeakRef": false,
|
|
2364
2364
|
"WeakSet": false
|
|
2365
2365
|
},
|
|
2366
|
+
"es2027": {
|
|
2367
|
+
"AggregateError": false,
|
|
2368
|
+
"Array": false,
|
|
2369
|
+
"ArrayBuffer": false,
|
|
2370
|
+
"Atomics": false,
|
|
2371
|
+
"BigInt": false,
|
|
2372
|
+
"BigInt64Array": false,
|
|
2373
|
+
"BigUint64Array": false,
|
|
2374
|
+
"Boolean": false,
|
|
2375
|
+
"DataView": false,
|
|
2376
|
+
"Date": false,
|
|
2377
|
+
"decodeURI": false,
|
|
2378
|
+
"decodeURIComponent": false,
|
|
2379
|
+
"encodeURI": false,
|
|
2380
|
+
"encodeURIComponent": false,
|
|
2381
|
+
"Error": false,
|
|
2382
|
+
"escape": false,
|
|
2383
|
+
"eval": false,
|
|
2384
|
+
"EvalError": false,
|
|
2385
|
+
"FinalizationRegistry": false,
|
|
2386
|
+
"Float16Array": false,
|
|
2387
|
+
"Float32Array": false,
|
|
2388
|
+
"Float64Array": false,
|
|
2389
|
+
"Function": false,
|
|
2390
|
+
"globalThis": false,
|
|
2391
|
+
"Infinity": false,
|
|
2392
|
+
"Int16Array": false,
|
|
2393
|
+
"Int32Array": false,
|
|
2394
|
+
"Int8Array": false,
|
|
2395
|
+
"Intl": false,
|
|
2396
|
+
"isFinite": false,
|
|
2397
|
+
"isNaN": false,
|
|
2398
|
+
"Iterator": false,
|
|
2399
|
+
"JSON": false,
|
|
2400
|
+
"Map": false,
|
|
2401
|
+
"Math": false,
|
|
2402
|
+
"NaN": false,
|
|
2403
|
+
"Number": false,
|
|
2404
|
+
"Object": false,
|
|
2405
|
+
"parseFloat": false,
|
|
2406
|
+
"parseInt": false,
|
|
2407
|
+
"Promise": false,
|
|
2408
|
+
"Proxy": false,
|
|
2409
|
+
"RangeError": false,
|
|
2410
|
+
"ReferenceError": false,
|
|
2411
|
+
"Reflect": false,
|
|
2412
|
+
"RegExp": false,
|
|
2413
|
+
"Set": false,
|
|
2414
|
+
"SharedArrayBuffer": false,
|
|
2415
|
+
"String": false,
|
|
2416
|
+
"Symbol": false,
|
|
2417
|
+
"SyntaxError": false,
|
|
2418
|
+
"TypeError": false,
|
|
2419
|
+
"Uint16Array": false,
|
|
2420
|
+
"Uint32Array": false,
|
|
2421
|
+
"Uint8Array": false,
|
|
2422
|
+
"Uint8ClampedArray": false,
|
|
2423
|
+
"undefined": false,
|
|
2424
|
+
"unescape": false,
|
|
2425
|
+
"URIError": false,
|
|
2426
|
+
"WeakMap": false,
|
|
2427
|
+
"WeakRef": false,
|
|
2428
|
+
"WeakSet": false
|
|
2429
|
+
},
|
|
2366
2430
|
"es3": {
|
|
2367
2431
|
"Array": false,
|
|
2368
2432
|
"Boolean": false,
|
|
@@ -4054,22 +4118,13 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4054
4118
|
}
|
|
4055
4119
|
};
|
|
4056
4120
|
}));
|
|
4057
|
-
|
|
4058
|
-
//#endregion
|
|
4059
|
-
//#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/index.js
|
|
4060
|
-
var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4061
|
-
module.exports = require_globals$1();
|
|
4062
|
-
}));
|
|
4063
|
-
|
|
4064
|
-
//#endregion
|
|
4065
|
-
//#region src/configs/helpers/reactLanguageOptions.ts
|
|
4066
|
-
var import_globals = /* @__PURE__ */ __toESM(require_globals(), 1);
|
|
4067
4121
|
const reactLanguageOptions = {
|
|
4068
4122
|
ecmaVersion: 2020,
|
|
4069
|
-
globals:
|
|
4123
|
+
globals: (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4124
|
+
module.exports = require_globals$1();
|
|
4125
|
+
})))(), 1)).default.browser,
|
|
4070
4126
|
parserOptions: { ecmaFeatures: { jsx: true } }
|
|
4071
4127
|
};
|
|
4072
|
-
|
|
4073
4128
|
//#endregion
|
|
4074
4129
|
//#region src/configs/helpers/typeScriptLanguageOptions.ts
|
|
4075
4130
|
const typeScriptLanguageOptions = {
|
|
@@ -4081,7 +4136,6 @@ const typeScriptLanguageOptions = {
|
|
|
4081
4136
|
tsconfigRootDir: process.cwd()
|
|
4082
4137
|
}
|
|
4083
4138
|
};
|
|
4084
|
-
|
|
4085
4139
|
//#endregion
|
|
4086
4140
|
//#region src/configs/helpers/unusedVarsIgnorePatterns.ts
|
|
4087
4141
|
const unusedVarsIgnorePatterns = {
|
|
@@ -4089,7 +4143,6 @@ const unusedVarsIgnorePatterns = {
|
|
|
4089
4143
|
caughtErrorsIgnorePattern: "^_",
|
|
4090
4144
|
varsIgnorePattern: "^_"
|
|
4091
4145
|
};
|
|
4092
|
-
|
|
4093
4146
|
//#endregion
|
|
4094
4147
|
//#region src/configs/helpers/sorting/sortClasses.ts
|
|
4095
4148
|
const sortClasses = {
|
|
@@ -4116,7 +4169,6 @@ const sortClasses = {
|
|
|
4116
4169
|
specialCharacters: "keep",
|
|
4117
4170
|
type: "alphabetical"
|
|
4118
4171
|
};
|
|
4119
|
-
|
|
4120
4172
|
//#endregion
|
|
4121
4173
|
//#region src/configs/helpers/sorting/sortExports.ts
|
|
4122
4174
|
const sortExports = {
|
|
@@ -4136,7 +4188,6 @@ const sortExports = {
|
|
|
4136
4188
|
specialCharacters: "keep",
|
|
4137
4189
|
type: "alphabetical"
|
|
4138
4190
|
};
|
|
4139
|
-
|
|
4140
4191
|
//#endregion
|
|
4141
4192
|
//#region src/configs/helpers/sorting/sortImports.ts
|
|
4142
4193
|
const sortImports = {
|
|
@@ -4175,7 +4226,6 @@ const sortImports = {
|
|
|
4175
4226
|
specialCharacters: "keep",
|
|
4176
4227
|
type: "alphabetical"
|
|
4177
4228
|
};
|
|
4178
|
-
|
|
4179
4229
|
//#endregion
|
|
4180
4230
|
//#region src/configs/helpers/sorting/sortObjects.ts
|
|
4181
4231
|
const sortObjects = {
|
|
@@ -4192,7 +4242,6 @@ const sortObjects = {
|
|
|
4192
4242
|
type: "alphabetical",
|
|
4193
4243
|
useConfigurationIf: {}
|
|
4194
4244
|
};
|
|
4195
|
-
|
|
4196
4245
|
//#endregion
|
|
4197
4246
|
exports.reactLanguageOptions = reactLanguageOptions;
|
|
4198
4247
|
exports.sortClasses = sortClasses;
|
|
@@ -4200,4 +4249,4 @@ exports.sortExports = sortExports;
|
|
|
4200
4249
|
exports.sortImports = sortImports;
|
|
4201
4250
|
exports.sortObjects = sortObjects;
|
|
4202
4251
|
exports.typeScriptLanguageOptions = typeScriptLanguageOptions;
|
|
4203
|
-
exports.unusedVarsIgnorePatterns = unusedVarsIgnorePatterns;
|
|
4252
|
+
exports.unusedVarsIgnorePatterns = unusedVarsIgnorePatterns;
|
package/dist/internal/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import tseslint from "typescript-eslint";
|
|
2
|
-
|
|
3
2
|
//#region \0rolldown/runtime.js
|
|
4
3
|
var __create = Object.create;
|
|
5
4
|
var __defProp = Object.defineProperty;
|
|
@@ -7,18 +6,14 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
7
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
9
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
9
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
11
10
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
}
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
+
key = keys[i];
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
22
17
|
}
|
|
23
18
|
return to;
|
|
24
19
|
};
|
|
@@ -26,9 +21,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
21
|
value: mod,
|
|
27
22
|
enumerable: true
|
|
28
23
|
}) : target, mod));
|
|
29
|
-
|
|
30
24
|
//#endregion
|
|
31
|
-
//#region node_modules/.pnpm/globals@17.
|
|
25
|
+
//#region node_modules/.pnpm/globals@17.5.0/node_modules/globals/globals.json
|
|
32
26
|
var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
33
27
|
module.exports = {
|
|
34
28
|
"amd": {
|
|
@@ -134,6 +128,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
134
128
|
"AudioNode": false,
|
|
135
129
|
"AudioParam": false,
|
|
136
130
|
"AudioParamMap": false,
|
|
131
|
+
"AudioPlaybackStats": false,
|
|
137
132
|
"AudioProcessingEvent": false,
|
|
138
133
|
"AudioScheduledSourceNode": false,
|
|
139
134
|
"AudioSinkInfo": false,
|
|
@@ -925,6 +920,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
925
920
|
"RTCSessionDescription": false,
|
|
926
921
|
"RTCStatsReport": false,
|
|
927
922
|
"RTCTrackEvent": false,
|
|
923
|
+
"Sanitizer": false,
|
|
928
924
|
"scheduler": false,
|
|
929
925
|
"Scheduler": false,
|
|
930
926
|
"Scheduling": false,
|
|
@@ -1126,6 +1122,9 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1126
1122
|
"TextTrackList": false,
|
|
1127
1123
|
"TextUpdateEvent": false,
|
|
1128
1124
|
"TimeEvent": false,
|
|
1125
|
+
"TimelineTrigger": false,
|
|
1126
|
+
"TimelineTriggerRange": false,
|
|
1127
|
+
"TimelineTriggerRangeList": false,
|
|
1129
1128
|
"TimeRanges": false,
|
|
1130
1129
|
"ToggleEvent": false,
|
|
1131
1130
|
"toolbar": false,
|
|
@@ -1571,6 +1570,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1571
1570
|
"PromiseRejectionEvent": false,
|
|
1572
1571
|
"prompt": false,
|
|
1573
1572
|
"queueMicrotask": false,
|
|
1573
|
+
"QuotaExceededError": false,
|
|
1574
1574
|
"ReadableByteStreamController": false,
|
|
1575
1575
|
"ReadableStream": false,
|
|
1576
1576
|
"ReadableStreamBYOBReader": false,
|
|
@@ -2361,6 +2361,70 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2361
2361
|
"WeakRef": false,
|
|
2362
2362
|
"WeakSet": false
|
|
2363
2363
|
},
|
|
2364
|
+
"es2027": {
|
|
2365
|
+
"AggregateError": false,
|
|
2366
|
+
"Array": false,
|
|
2367
|
+
"ArrayBuffer": false,
|
|
2368
|
+
"Atomics": false,
|
|
2369
|
+
"BigInt": false,
|
|
2370
|
+
"BigInt64Array": false,
|
|
2371
|
+
"BigUint64Array": false,
|
|
2372
|
+
"Boolean": false,
|
|
2373
|
+
"DataView": false,
|
|
2374
|
+
"Date": false,
|
|
2375
|
+
"decodeURI": false,
|
|
2376
|
+
"decodeURIComponent": false,
|
|
2377
|
+
"encodeURI": false,
|
|
2378
|
+
"encodeURIComponent": false,
|
|
2379
|
+
"Error": false,
|
|
2380
|
+
"escape": false,
|
|
2381
|
+
"eval": false,
|
|
2382
|
+
"EvalError": false,
|
|
2383
|
+
"FinalizationRegistry": false,
|
|
2384
|
+
"Float16Array": false,
|
|
2385
|
+
"Float32Array": false,
|
|
2386
|
+
"Float64Array": false,
|
|
2387
|
+
"Function": false,
|
|
2388
|
+
"globalThis": false,
|
|
2389
|
+
"Infinity": false,
|
|
2390
|
+
"Int16Array": false,
|
|
2391
|
+
"Int32Array": false,
|
|
2392
|
+
"Int8Array": false,
|
|
2393
|
+
"Intl": false,
|
|
2394
|
+
"isFinite": false,
|
|
2395
|
+
"isNaN": false,
|
|
2396
|
+
"Iterator": false,
|
|
2397
|
+
"JSON": false,
|
|
2398
|
+
"Map": false,
|
|
2399
|
+
"Math": false,
|
|
2400
|
+
"NaN": false,
|
|
2401
|
+
"Number": false,
|
|
2402
|
+
"Object": false,
|
|
2403
|
+
"parseFloat": false,
|
|
2404
|
+
"parseInt": false,
|
|
2405
|
+
"Promise": false,
|
|
2406
|
+
"Proxy": false,
|
|
2407
|
+
"RangeError": false,
|
|
2408
|
+
"ReferenceError": false,
|
|
2409
|
+
"Reflect": false,
|
|
2410
|
+
"RegExp": false,
|
|
2411
|
+
"Set": false,
|
|
2412
|
+
"SharedArrayBuffer": false,
|
|
2413
|
+
"String": false,
|
|
2414
|
+
"Symbol": false,
|
|
2415
|
+
"SyntaxError": false,
|
|
2416
|
+
"TypeError": false,
|
|
2417
|
+
"Uint16Array": false,
|
|
2418
|
+
"Uint32Array": false,
|
|
2419
|
+
"Uint8Array": false,
|
|
2420
|
+
"Uint8ClampedArray": false,
|
|
2421
|
+
"undefined": false,
|
|
2422
|
+
"unescape": false,
|
|
2423
|
+
"URIError": false,
|
|
2424
|
+
"WeakMap": false,
|
|
2425
|
+
"WeakRef": false,
|
|
2426
|
+
"WeakSet": false
|
|
2427
|
+
},
|
|
2364
2428
|
"es3": {
|
|
2365
2429
|
"Array": false,
|
|
2366
2430
|
"Boolean": false,
|
|
@@ -4052,22 +4116,13 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4052
4116
|
}
|
|
4053
4117
|
};
|
|
4054
4118
|
}));
|
|
4055
|
-
|
|
4056
|
-
//#endregion
|
|
4057
|
-
//#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/index.js
|
|
4058
|
-
var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4059
|
-
module.exports = require_globals$1();
|
|
4060
|
-
}));
|
|
4061
|
-
|
|
4062
|
-
//#endregion
|
|
4063
|
-
//#region src/configs/helpers/reactLanguageOptions.ts
|
|
4064
|
-
var import_globals = /* @__PURE__ */ __toESM(require_globals(), 1);
|
|
4065
4119
|
const reactLanguageOptions = {
|
|
4066
4120
|
ecmaVersion: 2020,
|
|
4067
|
-
globals:
|
|
4121
|
+
globals: (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4122
|
+
module.exports = require_globals$1();
|
|
4123
|
+
})))(), 1)).default.browser,
|
|
4068
4124
|
parserOptions: { ecmaFeatures: { jsx: true } }
|
|
4069
4125
|
};
|
|
4070
|
-
|
|
4071
4126
|
//#endregion
|
|
4072
4127
|
//#region src/configs/helpers/typeScriptLanguageOptions.ts
|
|
4073
4128
|
const typeScriptLanguageOptions = {
|
|
@@ -4079,7 +4134,6 @@ const typeScriptLanguageOptions = {
|
|
|
4079
4134
|
tsconfigRootDir: process.cwd()
|
|
4080
4135
|
}
|
|
4081
4136
|
};
|
|
4082
|
-
|
|
4083
4137
|
//#endregion
|
|
4084
4138
|
//#region src/configs/helpers/unusedVarsIgnorePatterns.ts
|
|
4085
4139
|
const unusedVarsIgnorePatterns = {
|
|
@@ -4087,7 +4141,6 @@ const unusedVarsIgnorePatterns = {
|
|
|
4087
4141
|
caughtErrorsIgnorePattern: "^_",
|
|
4088
4142
|
varsIgnorePattern: "^_"
|
|
4089
4143
|
};
|
|
4090
|
-
|
|
4091
4144
|
//#endregion
|
|
4092
4145
|
//#region src/configs/helpers/sorting/sortClasses.ts
|
|
4093
4146
|
const sortClasses = {
|
|
@@ -4114,7 +4167,6 @@ const sortClasses = {
|
|
|
4114
4167
|
specialCharacters: "keep",
|
|
4115
4168
|
type: "alphabetical"
|
|
4116
4169
|
};
|
|
4117
|
-
|
|
4118
4170
|
//#endregion
|
|
4119
4171
|
//#region src/configs/helpers/sorting/sortExports.ts
|
|
4120
4172
|
const sortExports = {
|
|
@@ -4134,7 +4186,6 @@ const sortExports = {
|
|
|
4134
4186
|
specialCharacters: "keep",
|
|
4135
4187
|
type: "alphabetical"
|
|
4136
4188
|
};
|
|
4137
|
-
|
|
4138
4189
|
//#endregion
|
|
4139
4190
|
//#region src/configs/helpers/sorting/sortImports.ts
|
|
4140
4191
|
const sortImports = {
|
|
@@ -4173,7 +4224,6 @@ const sortImports = {
|
|
|
4173
4224
|
specialCharacters: "keep",
|
|
4174
4225
|
type: "alphabetical"
|
|
4175
4226
|
};
|
|
4176
|
-
|
|
4177
4227
|
//#endregion
|
|
4178
4228
|
//#region src/configs/helpers/sorting/sortObjects.ts
|
|
4179
4229
|
const sortObjects = {
|
|
@@ -4190,6 +4240,5 @@ const sortObjects = {
|
|
|
4190
4240
|
type: "alphabetical",
|
|
4191
4241
|
useConfigurationIf: {}
|
|
4192
4242
|
};
|
|
4193
|
-
|
|
4194
4243
|
//#endregion
|
|
4195
|
-
export { reactLanguageOptions, sortClasses, sortExports, sortImports, sortObjects, typeScriptLanguageOptions, unusedVarsIgnorePatterns };
|
|
4244
|
+
export { reactLanguageOptions, sortClasses, sortExports, sortImports, sortObjects, typeScriptLanguageOptions, unusedVarsIgnorePatterns };
|
package/dist/utility/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
//#region \0rolldown/runtime.js
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -7,16 +7,12 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
9
|
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
|
+
get: ((k) => from[k]).bind(null, key),
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
20
16
|
}
|
|
21
17
|
return to;
|
|
22
18
|
};
|
|
@@ -24,13 +20,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
20
|
value: mod,
|
|
25
21
|
enumerable: true
|
|
26
22
|
}) : target, mod));
|
|
27
|
-
|
|
28
23
|
//#endregion
|
|
29
24
|
let _typescript_eslint_utils = require("@typescript-eslint/utils");
|
|
30
25
|
let _alextheman_utility = require("@alextheman/utility");
|
|
31
26
|
let zod = require("zod");
|
|
32
|
-
zod = __toESM(zod);
|
|
33
|
-
|
|
27
|
+
zod = __toESM(zod, 1);
|
|
28
|
+
let _alextheman_utility_v6 = require("@alextheman/utility/v6");
|
|
34
29
|
//#region src/utility/public/checkCallExpression.ts
|
|
35
30
|
/**
|
|
36
31
|
* Checks if a given node matches the expected object and property names.
|
|
@@ -46,7 +41,6 @@ zod = __toESM(zod);
|
|
|
46
41
|
function checkCallExpression(node, objectName, propertyName) {
|
|
47
42
|
return node.callee.type === _typescript_eslint_utils.AST_NODE_TYPES.MemberExpression && node.callee.object.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier && node.callee.object.name === objectName && node.callee.property.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier && node.callee.property.name === propertyName;
|
|
48
43
|
}
|
|
49
|
-
|
|
50
44
|
//#endregion
|
|
51
45
|
//#region src/utility/public/combineRestrictedImports.ts
|
|
52
46
|
/**
|
|
@@ -73,7 +67,6 @@ function combineRestrictedImports(...groups) {
|
|
|
73
67
|
if (combinedGroup.patterns.length === 0) return (0, _alextheman_utility.omitProperties)(combinedGroup, "patterns");
|
|
74
68
|
return combinedGroup;
|
|
75
69
|
}
|
|
76
|
-
|
|
77
70
|
//#endregion
|
|
78
71
|
//#region src/utility/public/createRuleSchemaFromZodSchema.ts
|
|
79
72
|
/**
|
|
@@ -88,7 +81,6 @@ function combineRestrictedImports(...groups) {
|
|
|
88
81
|
function createRuleSchemaFromZodSchema(schema) {
|
|
89
82
|
return [(0, _alextheman_utility.omitProperties)(zod.default.toJSONSchema(schema), "$schema")];
|
|
90
83
|
}
|
|
91
|
-
|
|
92
84
|
//#endregion
|
|
93
85
|
//#region src/utility/public/fixOnCondition.ts
|
|
94
86
|
/**
|
|
@@ -107,14 +99,12 @@ function fixOnCondition(fixable, fix) {
|
|
|
107
99
|
return fix(fixer);
|
|
108
100
|
};
|
|
109
101
|
}
|
|
110
|
-
|
|
111
102
|
//#endregion
|
|
112
103
|
//#region src/utility/private/camelToKebab.ts
|
|
113
104
|
function camelToKebab(string) {
|
|
114
|
-
if (string[0] === string[0].toUpperCase()) throw new
|
|
105
|
+
if (string[0] === string[0].toUpperCase()) throw new _alextheman_utility_v6.DataError({ string }, "CAMEL_TO_KEBAB_CONVERSION_ERROR", "camelCase string must start with a lowercase letter.");
|
|
115
106
|
return (0, _alextheman_utility.camelToKebab)(string, { preserveConsecutiveCapitals: false });
|
|
116
107
|
}
|
|
117
|
-
|
|
118
108
|
//#endregion
|
|
119
109
|
//#region src/utility/private/createConfigGroup.ts
|
|
120
110
|
function createConfigGroup(group, configs) {
|
|
@@ -122,7 +112,6 @@ function createConfigGroup(group, configs) {
|
|
|
122
112
|
for (const key in configs) newConfigs[`${camelToKebab(group)}/${camelToKebab(key)}`] = configs[key];
|
|
123
113
|
return newConfigs;
|
|
124
114
|
}
|
|
125
|
-
|
|
126
115
|
//#endregion
|
|
127
116
|
//#region src/utility/public/flattenConfigs.ts
|
|
128
117
|
/**
|
|
@@ -167,7 +156,6 @@ function flattenConfigs(config) {
|
|
|
167
156
|
for (const configGroupEntries of Object.entries(config)) Object.assign(allConfigs, createConfigGroup(...configGroupEntries));
|
|
168
157
|
return allConfigs;
|
|
169
158
|
}
|
|
170
|
-
|
|
171
159
|
//#endregion
|
|
172
160
|
//#region src/utility/public/getImportSpecifiersAfterRemoving.ts
|
|
173
161
|
/**
|
|
@@ -192,11 +180,10 @@ function getImportSpecifiersAfterRemoving(context, specifiers, importToRemove) {
|
|
|
192
180
|
return context.sourceCode.getText(specifier);
|
|
193
181
|
}).join(", ");
|
|
194
182
|
}
|
|
195
|
-
|
|
196
183
|
//#endregion
|
|
197
184
|
exports.checkCallExpression = checkCallExpression;
|
|
198
185
|
exports.combineRestrictedImports = combineRestrictedImports;
|
|
199
186
|
exports.createRuleSchemaFromZodSchema = createRuleSchemaFromZodSchema;
|
|
200
187
|
exports.fixOnCondition = fixOnCondition;
|
|
201
188
|
exports.flattenConfigs = flattenConfigs;
|
|
202
|
-
exports.getImportSpecifiersAfterRemoving = getImportSpecifiersAfterRemoving;
|
|
189
|
+
exports.getImportSpecifiersAfterRemoving = getImportSpecifiersAfterRemoving;
|
package/dist/utility/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
|
|
2
|
-
import {
|
|
2
|
+
import { camelToKebab, omitProperties } from "@alextheman/utility";
|
|
3
3
|
import z from "zod";
|
|
4
|
-
|
|
4
|
+
import { DataError } from "@alextheman/utility/v6";
|
|
5
5
|
//#region src/utility/public/checkCallExpression.ts
|
|
6
6
|
/**
|
|
7
7
|
* Checks if a given node matches the expected object and property names.
|
|
@@ -17,7 +17,6 @@ import z from "zod";
|
|
|
17
17
|
function checkCallExpression(node, objectName, propertyName) {
|
|
18
18
|
return node.callee.type === AST_NODE_TYPES.MemberExpression && node.callee.object.type === AST_NODE_TYPES.Identifier && node.callee.object.name === objectName && node.callee.property.type === AST_NODE_TYPES.Identifier && node.callee.property.name === propertyName;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
20
|
//#endregion
|
|
22
21
|
//#region src/utility/public/combineRestrictedImports.ts
|
|
23
22
|
/**
|
|
@@ -44,7 +43,6 @@ function combineRestrictedImports(...groups) {
|
|
|
44
43
|
if (combinedGroup.patterns.length === 0) return omitProperties(combinedGroup, "patterns");
|
|
45
44
|
return combinedGroup;
|
|
46
45
|
}
|
|
47
|
-
|
|
48
46
|
//#endregion
|
|
49
47
|
//#region src/utility/public/createRuleSchemaFromZodSchema.ts
|
|
50
48
|
/**
|
|
@@ -59,7 +57,6 @@ function combineRestrictedImports(...groups) {
|
|
|
59
57
|
function createRuleSchemaFromZodSchema(schema) {
|
|
60
58
|
return [omitProperties(z.toJSONSchema(schema), "$schema")];
|
|
61
59
|
}
|
|
62
|
-
|
|
63
60
|
//#endregion
|
|
64
61
|
//#region src/utility/public/fixOnCondition.ts
|
|
65
62
|
/**
|
|
@@ -78,14 +75,12 @@ function fixOnCondition(fixable, fix) {
|
|
|
78
75
|
return fix(fixer);
|
|
79
76
|
};
|
|
80
77
|
}
|
|
81
|
-
|
|
82
78
|
//#endregion
|
|
83
79
|
//#region src/utility/private/camelToKebab.ts
|
|
84
80
|
function camelToKebab$1(string) {
|
|
85
81
|
if (string[0] === string[0].toUpperCase()) throw new DataError({ string }, "CAMEL_TO_KEBAB_CONVERSION_ERROR", "camelCase string must start with a lowercase letter.");
|
|
86
82
|
return camelToKebab(string, { preserveConsecutiveCapitals: false });
|
|
87
83
|
}
|
|
88
|
-
|
|
89
84
|
//#endregion
|
|
90
85
|
//#region src/utility/private/createConfigGroup.ts
|
|
91
86
|
function createConfigGroup(group, configs) {
|
|
@@ -93,7 +88,6 @@ function createConfigGroup(group, configs) {
|
|
|
93
88
|
for (const key in configs) newConfigs[`${camelToKebab$1(group)}/${camelToKebab$1(key)}`] = configs[key];
|
|
94
89
|
return newConfigs;
|
|
95
90
|
}
|
|
96
|
-
|
|
97
91
|
//#endregion
|
|
98
92
|
//#region src/utility/public/flattenConfigs.ts
|
|
99
93
|
/**
|
|
@@ -138,7 +132,6 @@ function flattenConfigs(config) {
|
|
|
138
132
|
for (const configGroupEntries of Object.entries(config)) Object.assign(allConfigs, createConfigGroup(...configGroupEntries));
|
|
139
133
|
return allConfigs;
|
|
140
134
|
}
|
|
141
|
-
|
|
142
135
|
//#endregion
|
|
143
136
|
//#region src/utility/public/getImportSpecifiersAfterRemoving.ts
|
|
144
137
|
/**
|
|
@@ -163,6 +156,5 @@ function getImportSpecifiersAfterRemoving(context, specifiers, importToRemove) {
|
|
|
163
156
|
return context.sourceCode.getText(specifier);
|
|
164
157
|
}).join(", ");
|
|
165
158
|
}
|
|
166
|
-
|
|
167
159
|
//#endregion
|
|
168
|
-
export { checkCallExpression, combineRestrictedImports, createRuleSchemaFromZodSchema, fixOnCondition, flattenConfigs, getImportSpecifiersAfterRemoving };
|
|
160
|
+
export { checkCallExpression, combineRestrictedImports, createRuleSchemaFromZodSchema, fixOnCondition, flattenConfigs, getImportSpecifiersAfterRemoving };
|