@alextheman/eslint-plugin 5.13.0 → 5.14.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.cjs CHANGED
@@ -9,7 +9,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
9
9
  var __getOwnPropNames = Object.getOwnPropertyNames;
10
10
  var __getProtoOf = Object.getPrototypeOf;
11
11
  var __hasOwnProp = Object.prototype.hasOwnProperty;
12
- var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
12
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
13
13
  var __copyProps = (to, from, except, desc) => {
14
14
  if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
15
15
  key = keys[i];
@@ -28,37 +28,38 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  let _alextheman_utility = require("@alextheman/utility");
29
29
  let _typescript_eslint_utils = require("@typescript-eslint/utils");
30
30
  let zod = require("zod");
31
- zod = __toESM(zod);
31
+ zod = __toESM(zod, 1);
32
+ let _alextheman_utility_v6 = require("@alextheman/utility/v6");
32
33
  let _eslint_js = require("@eslint/js");
33
- _eslint_js = __toESM(_eslint_js);
34
+ _eslint_js = __toESM(_eslint_js, 1);
34
35
  let eslint_config_prettier = require("eslint-config-prettier");
35
- eslint_config_prettier = __toESM(eslint_config_prettier);
36
+ eslint_config_prettier = __toESM(eslint_config_prettier, 1);
36
37
  let eslint_import_resolver_typescript = require("eslint-import-resolver-typescript");
37
- eslint_import_resolver_typescript = __toESM(eslint_import_resolver_typescript);
38
+ eslint_import_resolver_typescript = __toESM(eslint_import_resolver_typescript, 1);
38
39
  let eslint_plugin_import_x = require("eslint-plugin-import-x");
39
- eslint_plugin_import_x = __toESM(eslint_plugin_import_x);
40
+ eslint_plugin_import_x = __toESM(eslint_plugin_import_x, 1);
40
41
  let eslint_plugin_n = require("eslint-plugin-n");
41
- eslint_plugin_n = __toESM(eslint_plugin_n);
42
+ eslint_plugin_n = __toESM(eslint_plugin_n, 1);
42
43
  let eslint_plugin_perfectionist = require("eslint-plugin-perfectionist");
43
- eslint_plugin_perfectionist = __toESM(eslint_plugin_perfectionist);
44
+ eslint_plugin_perfectionist = __toESM(eslint_plugin_perfectionist, 1);
44
45
  let eslint_plugin_prettier = require("eslint-plugin-prettier");
45
- eslint_plugin_prettier = __toESM(eslint_plugin_prettier);
46
+ eslint_plugin_prettier = __toESM(eslint_plugin_prettier, 1);
46
47
  let typescript_eslint = require("typescript-eslint");
47
- typescript_eslint = __toESM(typescript_eslint);
48
+ typescript_eslint = __toESM(typescript_eslint, 1);
48
49
  let eslint_plugin_jsx_a11y = require("eslint-plugin-jsx-a11y");
49
- eslint_plugin_jsx_a11y = __toESM(eslint_plugin_jsx_a11y);
50
+ eslint_plugin_jsx_a11y = __toESM(eslint_plugin_jsx_a11y, 1);
50
51
  let eslint_plugin_react = require("eslint-plugin-react");
51
- eslint_plugin_react = __toESM(eslint_plugin_react);
52
+ eslint_plugin_react = __toESM(eslint_plugin_react, 1);
52
53
  let eslint_plugin_react_refresh = require("eslint-plugin-react-refresh");
53
- eslint_plugin_react_refresh = __toESM(eslint_plugin_react_refresh);
54
+ eslint_plugin_react_refresh = __toESM(eslint_plugin_react_refresh, 1);
54
55
  let eslint_plugin_react_hooks = require("eslint-plugin-react-hooks");
55
- eslint_plugin_react_hooks = __toESM(eslint_plugin_react_hooks);
56
+ eslint_plugin_react_hooks = __toESM(eslint_plugin_react_hooks, 1);
56
57
  let eslint_plugin_package_json = require("eslint-plugin-package-json");
57
- eslint_plugin_package_json = __toESM(eslint_plugin_package_json);
58
+ eslint_plugin_package_json = __toESM(eslint_plugin_package_json, 1);
58
59
  let eslint_plugin_jsdoc = require("eslint-plugin-jsdoc");
59
- eslint_plugin_jsdoc = __toESM(eslint_plugin_jsdoc);
60
+ eslint_plugin_jsdoc = __toESM(eslint_plugin_jsdoc, 1);
60
61
  let _alextheman_utility_node = require("@alextheman/utility/node");
61
- //#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/globals.json
62
+ //#region node_modules/.pnpm/globals@17.5.0/node_modules/globals/globals.json
62
63
  var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
63
64
  module.exports = {
64
65
  "amd": {
@@ -164,6 +165,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
164
165
  "AudioNode": false,
165
166
  "AudioParam": false,
166
167
  "AudioParamMap": false,
168
+ "AudioPlaybackStats": false,
167
169
  "AudioProcessingEvent": false,
168
170
  "AudioScheduledSourceNode": false,
169
171
  "AudioSinkInfo": false,
@@ -955,6 +957,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
955
957
  "RTCSessionDescription": false,
956
958
  "RTCStatsReport": false,
957
959
  "RTCTrackEvent": false,
960
+ "Sanitizer": false,
958
961
  "scheduler": false,
959
962
  "Scheduler": false,
960
963
  "Scheduling": false,
@@ -1156,6 +1159,9 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1156
1159
  "TextTrackList": false,
1157
1160
  "TextUpdateEvent": false,
1158
1161
  "TimeEvent": false,
1162
+ "TimelineTrigger": false,
1163
+ "TimelineTriggerRange": false,
1164
+ "TimelineTriggerRangeList": false,
1159
1165
  "TimeRanges": false,
1160
1166
  "ToggleEvent": false,
1161
1167
  "toolbar": false,
@@ -1601,6 +1607,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1601
1607
  "PromiseRejectionEvent": false,
1602
1608
  "prompt": false,
1603
1609
  "queueMicrotask": false,
1610
+ "QuotaExceededError": false,
1604
1611
  "ReadableByteStreamController": false,
1605
1612
  "ReadableStream": false,
1606
1613
  "ReadableStreamBYOBReader": false,
@@ -2391,6 +2398,70 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2391
2398
  "WeakRef": false,
2392
2399
  "WeakSet": false
2393
2400
  },
2401
+ "es2027": {
2402
+ "AggregateError": false,
2403
+ "Array": false,
2404
+ "ArrayBuffer": false,
2405
+ "Atomics": false,
2406
+ "BigInt": false,
2407
+ "BigInt64Array": false,
2408
+ "BigUint64Array": false,
2409
+ "Boolean": false,
2410
+ "DataView": false,
2411
+ "Date": false,
2412
+ "decodeURI": false,
2413
+ "decodeURIComponent": false,
2414
+ "encodeURI": false,
2415
+ "encodeURIComponent": false,
2416
+ "Error": false,
2417
+ "escape": false,
2418
+ "eval": false,
2419
+ "EvalError": false,
2420
+ "FinalizationRegistry": false,
2421
+ "Float16Array": false,
2422
+ "Float32Array": false,
2423
+ "Float64Array": false,
2424
+ "Function": false,
2425
+ "globalThis": false,
2426
+ "Infinity": false,
2427
+ "Int16Array": false,
2428
+ "Int32Array": false,
2429
+ "Int8Array": false,
2430
+ "Intl": false,
2431
+ "isFinite": false,
2432
+ "isNaN": false,
2433
+ "Iterator": false,
2434
+ "JSON": false,
2435
+ "Map": false,
2436
+ "Math": false,
2437
+ "NaN": false,
2438
+ "Number": false,
2439
+ "Object": false,
2440
+ "parseFloat": false,
2441
+ "parseInt": false,
2442
+ "Promise": false,
2443
+ "Proxy": false,
2444
+ "RangeError": false,
2445
+ "ReferenceError": false,
2446
+ "Reflect": false,
2447
+ "RegExp": false,
2448
+ "Set": false,
2449
+ "SharedArrayBuffer": false,
2450
+ "String": false,
2451
+ "Symbol": false,
2452
+ "SyntaxError": false,
2453
+ "TypeError": false,
2454
+ "Uint16Array": false,
2455
+ "Uint32Array": false,
2456
+ "Uint8Array": false,
2457
+ "Uint8ClampedArray": false,
2458
+ "undefined": false,
2459
+ "unescape": false,
2460
+ "URIError": false,
2461
+ "WeakMap": false,
2462
+ "WeakRef": false,
2463
+ "WeakSet": false
2464
+ },
2394
2465
  "es3": {
2395
2466
  "Array": false,
2396
2467
  "Boolean": false,
@@ -4083,7 +4154,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4083
4154
  };
4084
4155
  }));
4085
4156
  //#endregion
4086
- //#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/index.js
4157
+ //#region node_modules/.pnpm/globals@17.5.0/node_modules/globals/index.js
4087
4158
  var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4088
4159
  module.exports = require_globals$1();
4089
4160
  }));
@@ -4170,7 +4241,7 @@ function fixOnCondition(fixable, fix) {
4170
4241
  //#endregion
4171
4242
  //#region src/utility/private/camelToKebab.ts
4172
4243
  function camelToKebab(string) {
4173
- if (string[0] === string[0].toUpperCase()) throw new _alextheman_utility.DataError({ string }, "CAMEL_TO_KEBAB_CONVERSION_ERROR", "camelCase string must start with a lowercase letter.");
4244
+ 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.");
4174
4245
  return (0, _alextheman_utility.camelToKebab)(string, { preserveConsecutiveCapitals: false });
4175
4246
  }
4176
4247
  //#endregion
@@ -4418,6 +4489,20 @@ const typeScriptLanguageOptions = {
4418
4489
  }
4419
4490
  };
4420
4491
  //#endregion
4492
+ //#region src/configs/helpers/restrictedImports/personalRestrictedImports.ts
4493
+ const personalRestrictedImports = combineRestrictedImports(generalRestrictedImports, { paths: [...["fs", "node:fs"].map((name) => {
4494
+ return {
4495
+ message: "Please use node:fs/promises instead.",
4496
+ name
4497
+ };
4498
+ })] });
4499
+ //#endregion
4500
+ //#region src/configs/helpers/restrictedImports/reactRestrictedImports.ts
4501
+ const reactRestrictedImports = combineRestrictedImports(generalRestrictedImports, { patterns: [{
4502
+ message: "Please use `import Component from \"@mui/[package]/Component\"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.",
4503
+ regex: "^@mui/[^/]+$"
4504
+ }] });
4505
+ //#endregion
4421
4506
  //#region src/configs/helpers/sorting/sortClasses.ts
4422
4507
  const sortClasses = {
4423
4508
  customGroups: [],
@@ -4517,14 +4602,6 @@ const sortObjects = {
4517
4602
  useConfigurationIf: {}
4518
4603
  };
4519
4604
  //#endregion
4520
- //#region src/configs/helpers/restrictedImports/personalRestrictedImports.ts
4521
- const personalRestrictedImports = combineRestrictedImports(generalRestrictedImports, { paths: [...["fs", "node:fs"].map((name) => {
4522
- return {
4523
- message: "Please use node:fs/promises instead.",
4524
- name
4525
- };
4526
- })] });
4527
- //#endregion
4528
4605
  //#region src/configs/helpers/sorting/sortNamedImports.ts
4529
4606
  const sortNamedImports = {
4530
4607
  fallbackSort: { type: "unsorted" },
@@ -4641,12 +4718,6 @@ const generalReact = [
4641
4718
  }
4642
4719
  ];
4643
4720
  //#endregion
4644
- //#region src/configs/helpers/restrictedImports/reactRestrictedImports.ts
4645
- const reactRestrictedImports = combineRestrictedImports(generalRestrictedImports, { patterns: [{
4646
- message: "Please use `import Component from \"@mui/[package]/Component\"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.",
4647
- regex: "^@mui/[^/]+$"
4648
- }] });
4649
- //#endregion
4650
4721
  //#region src/configs/internal/react.ts
4651
4722
  const internalReact = [{
4652
4723
  languageOptions: reactLanguageOptions,
@@ -5154,7 +5225,7 @@ const consistentTestFunction = createRule({
5154
5225
  //#region src/rules/has-standards.ts
5155
5226
  const hasStandardsOptionsSchema = zod.default.object({ fixable: zod.default.boolean() }).partial();
5156
5227
  function parseHasStandardsOptions(input) {
5157
- return (0, _alextheman_utility.parseZodSchema)(hasStandardsOptionsSchema, input);
5228
+ return _alextheman_utility.az.with(hasStandardsOptionsSchema).parse(input);
5158
5229
  }
5159
5230
  const defaultOptions = { fixable: false };
5160
5231
  const targetValue = "I have standards, you'd better have some too!";
@@ -5433,37 +5504,12 @@ const useObjectShorthandOptionsSchema = zod.default.object({ fixable: zod.defaul
5433
5504
  function parseUseObjectShorthandOptions(data) {
5434
5505
  return useObjectShorthandOptionsSchema.parse(data);
5435
5506
  }
5436
- const useObjectShorthand = createRule({
5437
- name: "use-object-shorthand",
5438
- meta: {
5439
- docs: { description: "Encourage the use of object shorthand (e.g. const property = \"Hello\"; const object = { property });" },
5440
- messages: { useShorthand: "{ {{source}} } is not allowed. Please use the object shorthand." },
5441
- type: "suggestion",
5442
- fixable: "code",
5443
- schema: createRuleSchemaFromZodSchema(useObjectShorthandOptionsSchema)
5444
- },
5445
- defaultOptions: [{ fixable: true }],
5446
- create(context) {
5447
- const { fixable = true } = parseUseObjectShorthandOptions(context.options[0] ?? { fixable: true });
5448
- return { Property(node) {
5449
- if (node.key.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier && node.value.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier && node.key.name === node.value.name && !node.shorthand) context.report({
5450
- node,
5451
- messageId: "useShorthand",
5452
- data: { source: context.sourceCode.getText(node) },
5453
- fix: fixOnCondition(fixable, (fixer) => {
5454
- const key = node.key;
5455
- return fixer.replaceTextRange([node.range[0], node.range[1]], key.name);
5456
- })
5457
- });
5458
- } };
5459
- }
5460
- });
5461
5507
  //#endregion
5462
5508
  //#region src/alexPlugin.ts
5463
5509
  const alexPlugin = {
5464
5510
  meta: {
5465
5511
  name: "@alextheman/eslint-plugin",
5466
- version: "5.13.0",
5512
+ version: "5.14.0",
5467
5513
  namespace: "alextheman"
5468
5514
  },
5469
5515
  configs: {},
@@ -5477,7 +5523,31 @@ const alexPlugin = {
5477
5523
  "no-skipped-tests": noSkippedTests,
5478
5524
  "standardise-error-messages": standardiseErrorMessages,
5479
5525
  "use-normalized-imports": useNormalizedImports,
5480
- "use-object-shorthand": useObjectShorthand
5526
+ "use-object-shorthand": createRule({
5527
+ name: "use-object-shorthand",
5528
+ meta: {
5529
+ docs: { description: "Encourage the use of object shorthand (e.g. const property = \"Hello\"; const object = { property });" },
5530
+ messages: { useShorthand: "{ {{source}} } is not allowed. Please use the object shorthand." },
5531
+ type: "suggestion",
5532
+ fixable: "code",
5533
+ schema: createRuleSchemaFromZodSchema(useObjectShorthandOptionsSchema)
5534
+ },
5535
+ defaultOptions: [{ fixable: true }],
5536
+ create(context) {
5537
+ const { fixable = true } = parseUseObjectShorthandOptions(context.options[0] ?? { fixable: true });
5538
+ return { Property(node) {
5539
+ if (node.key.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier && node.value.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier && node.key.name === node.value.name && !node.shorthand) context.report({
5540
+ node,
5541
+ messageId: "useShorthand",
5542
+ data: { source: context.sourceCode.getText(node) },
5543
+ fix: fixOnCondition(fixable, (fixer) => {
5544
+ const key = node.key;
5545
+ return fixer.replaceTextRange([node.range[0], node.range[1]], key.name);
5546
+ })
5547
+ });
5548
+ } };
5549
+ }
5550
+ })
5481
5551
  }
5482
5552
  };
5483
5553
  alexPlugin.configs = createAlexPluginConfigs((0, _alextheman_utility.deepFreeze)((0, _alextheman_utility.deepCopy)(alexPlugin)));
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
- import { DataError, camelToKebab, deepCopy, deepFreeze, normaliseIndents, omitProperties, parseZodSchema } from "@alextheman/utility";
1
+ import { az, camelToKebab, deepCopy, deepFreeze, normaliseIndents, omitProperties } from "@alextheman/utility";
2
2
  import { AST_NODE_TYPES, ESLintUtils } from "@typescript-eslint/utils";
3
3
  import z from "zod";
4
+ import { DataError } from "@alextheman/utility/v6";
4
5
  import js from "@eslint/js";
5
6
  import prettierConfig$1 from "eslint-config-prettier";
6
7
  import * as tsResolver from "eslint-import-resolver-typescript";
@@ -23,7 +24,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
23
24
  var __getOwnPropNames = Object.getOwnPropertyNames;
24
25
  var __getProtoOf = Object.getPrototypeOf;
25
26
  var __hasOwnProp = Object.prototype.hasOwnProperty;
26
- var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
27
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
27
28
  var __copyProps = (to, from, except, desc) => {
28
29
  if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
29
30
  key = keys[i];
@@ -39,7 +40,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
39
40
  enumerable: true
40
41
  }) : target, mod));
41
42
  //#endregion
42
- //#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/globals.json
43
+ //#region node_modules/.pnpm/globals@17.5.0/node_modules/globals/globals.json
43
44
  var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
44
45
  module.exports = {
45
46
  "amd": {
@@ -145,6 +146,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
145
146
  "AudioNode": false,
146
147
  "AudioParam": false,
147
148
  "AudioParamMap": false,
149
+ "AudioPlaybackStats": false,
148
150
  "AudioProcessingEvent": false,
149
151
  "AudioScheduledSourceNode": false,
150
152
  "AudioSinkInfo": false,
@@ -936,6 +938,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
936
938
  "RTCSessionDescription": false,
937
939
  "RTCStatsReport": false,
938
940
  "RTCTrackEvent": false,
941
+ "Sanitizer": false,
939
942
  "scheduler": false,
940
943
  "Scheduler": false,
941
944
  "Scheduling": false,
@@ -1137,6 +1140,9 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1137
1140
  "TextTrackList": false,
1138
1141
  "TextUpdateEvent": false,
1139
1142
  "TimeEvent": false,
1143
+ "TimelineTrigger": false,
1144
+ "TimelineTriggerRange": false,
1145
+ "TimelineTriggerRangeList": false,
1140
1146
  "TimeRanges": false,
1141
1147
  "ToggleEvent": false,
1142
1148
  "toolbar": false,
@@ -1582,6 +1588,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1582
1588
  "PromiseRejectionEvent": false,
1583
1589
  "prompt": false,
1584
1590
  "queueMicrotask": false,
1591
+ "QuotaExceededError": false,
1585
1592
  "ReadableByteStreamController": false,
1586
1593
  "ReadableStream": false,
1587
1594
  "ReadableStreamBYOBReader": false,
@@ -2372,6 +2379,70 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2372
2379
  "WeakRef": false,
2373
2380
  "WeakSet": false
2374
2381
  },
2382
+ "es2027": {
2383
+ "AggregateError": false,
2384
+ "Array": false,
2385
+ "ArrayBuffer": false,
2386
+ "Atomics": false,
2387
+ "BigInt": false,
2388
+ "BigInt64Array": false,
2389
+ "BigUint64Array": false,
2390
+ "Boolean": false,
2391
+ "DataView": false,
2392
+ "Date": false,
2393
+ "decodeURI": false,
2394
+ "decodeURIComponent": false,
2395
+ "encodeURI": false,
2396
+ "encodeURIComponent": false,
2397
+ "Error": false,
2398
+ "escape": false,
2399
+ "eval": false,
2400
+ "EvalError": false,
2401
+ "FinalizationRegistry": false,
2402
+ "Float16Array": false,
2403
+ "Float32Array": false,
2404
+ "Float64Array": false,
2405
+ "Function": false,
2406
+ "globalThis": false,
2407
+ "Infinity": false,
2408
+ "Int16Array": false,
2409
+ "Int32Array": false,
2410
+ "Int8Array": false,
2411
+ "Intl": false,
2412
+ "isFinite": false,
2413
+ "isNaN": false,
2414
+ "Iterator": false,
2415
+ "JSON": false,
2416
+ "Map": false,
2417
+ "Math": false,
2418
+ "NaN": false,
2419
+ "Number": false,
2420
+ "Object": false,
2421
+ "parseFloat": false,
2422
+ "parseInt": false,
2423
+ "Promise": false,
2424
+ "Proxy": false,
2425
+ "RangeError": false,
2426
+ "ReferenceError": false,
2427
+ "Reflect": false,
2428
+ "RegExp": false,
2429
+ "Set": false,
2430
+ "SharedArrayBuffer": false,
2431
+ "String": false,
2432
+ "Symbol": false,
2433
+ "SyntaxError": false,
2434
+ "TypeError": false,
2435
+ "Uint16Array": false,
2436
+ "Uint32Array": false,
2437
+ "Uint8Array": false,
2438
+ "Uint8ClampedArray": false,
2439
+ "undefined": false,
2440
+ "unescape": false,
2441
+ "URIError": false,
2442
+ "WeakMap": false,
2443
+ "WeakRef": false,
2444
+ "WeakSet": false
2445
+ },
2375
2446
  "es3": {
2376
2447
  "Array": false,
2377
2448
  "Boolean": false,
@@ -4064,7 +4135,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4064
4135
  };
4065
4136
  }));
4066
4137
  //#endregion
4067
- //#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/index.js
4138
+ //#region node_modules/.pnpm/globals@17.5.0/node_modules/globals/index.js
4068
4139
  var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4069
4140
  module.exports = require_globals$1();
4070
4141
  }));
@@ -4399,6 +4470,20 @@ const typeScriptLanguageOptions = {
4399
4470
  }
4400
4471
  };
4401
4472
  //#endregion
4473
+ //#region src/configs/helpers/restrictedImports/personalRestrictedImports.ts
4474
+ const personalRestrictedImports = combineRestrictedImports(generalRestrictedImports, { paths: [...["fs", "node:fs"].map((name) => {
4475
+ return {
4476
+ message: "Please use node:fs/promises instead.",
4477
+ name
4478
+ };
4479
+ })] });
4480
+ //#endregion
4481
+ //#region src/configs/helpers/restrictedImports/reactRestrictedImports.ts
4482
+ const reactRestrictedImports = combineRestrictedImports(generalRestrictedImports, { patterns: [{
4483
+ message: "Please use `import Component from \"@mui/[package]/Component\"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.",
4484
+ regex: "^@mui/[^/]+$"
4485
+ }] });
4486
+ //#endregion
4402
4487
  //#region src/configs/helpers/sorting/sortClasses.ts
4403
4488
  const sortClasses = {
4404
4489
  customGroups: [],
@@ -4498,14 +4583,6 @@ const sortObjects = {
4498
4583
  useConfigurationIf: {}
4499
4584
  };
4500
4585
  //#endregion
4501
- //#region src/configs/helpers/restrictedImports/personalRestrictedImports.ts
4502
- const personalRestrictedImports = combineRestrictedImports(generalRestrictedImports, { paths: [...["fs", "node:fs"].map((name) => {
4503
- return {
4504
- message: "Please use node:fs/promises instead.",
4505
- name
4506
- };
4507
- })] });
4508
- //#endregion
4509
4586
  //#region src/configs/helpers/sorting/sortNamedImports.ts
4510
4587
  const sortNamedImports = {
4511
4588
  fallbackSort: { type: "unsorted" },
@@ -4622,12 +4699,6 @@ const generalReact = [
4622
4699
  }
4623
4700
  ];
4624
4701
  //#endregion
4625
- //#region src/configs/helpers/restrictedImports/reactRestrictedImports.ts
4626
- const reactRestrictedImports = combineRestrictedImports(generalRestrictedImports, { patterns: [{
4627
- message: "Please use `import Component from \"@mui/[package]/Component\"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.",
4628
- regex: "^@mui/[^/]+$"
4629
- }] });
4630
- //#endregion
4631
4702
  //#region src/configs/internal/react.ts
4632
4703
  const internalReact = [{
4633
4704
  languageOptions: reactLanguageOptions,
@@ -5135,7 +5206,7 @@ const consistentTestFunction = createRule({
5135
5206
  //#region src/rules/has-standards.ts
5136
5207
  const hasStandardsOptionsSchema = z.object({ fixable: z.boolean() }).partial();
5137
5208
  function parseHasStandardsOptions(input) {
5138
- return parseZodSchema(hasStandardsOptionsSchema, input);
5209
+ return az.with(hasStandardsOptionsSchema).parse(input);
5139
5210
  }
5140
5211
  const defaultOptions = { fixable: false };
5141
5212
  const targetValue = "I have standards, you'd better have some too!";
@@ -5414,37 +5485,12 @@ const useObjectShorthandOptionsSchema = z.object({ fixable: z.boolean() }).parti
5414
5485
  function parseUseObjectShorthandOptions(data) {
5415
5486
  return useObjectShorthandOptionsSchema.parse(data);
5416
5487
  }
5417
- const useObjectShorthand = createRule({
5418
- name: "use-object-shorthand",
5419
- meta: {
5420
- docs: { description: "Encourage the use of object shorthand (e.g. const property = \"Hello\"; const object = { property });" },
5421
- messages: { useShorthand: "{ {{source}} } is not allowed. Please use the object shorthand." },
5422
- type: "suggestion",
5423
- fixable: "code",
5424
- schema: createRuleSchemaFromZodSchema(useObjectShorthandOptionsSchema)
5425
- },
5426
- defaultOptions: [{ fixable: true }],
5427
- create(context) {
5428
- const { fixable = true } = parseUseObjectShorthandOptions(context.options[0] ?? { fixable: true });
5429
- return { Property(node) {
5430
- if (node.key.type === AST_NODE_TYPES.Identifier && node.value.type === AST_NODE_TYPES.Identifier && node.key.name === node.value.name && !node.shorthand) context.report({
5431
- node,
5432
- messageId: "useShorthand",
5433
- data: { source: context.sourceCode.getText(node) },
5434
- fix: fixOnCondition(fixable, (fixer) => {
5435
- const key = node.key;
5436
- return fixer.replaceTextRange([node.range[0], node.range[1]], key.name);
5437
- })
5438
- });
5439
- } };
5440
- }
5441
- });
5442
5488
  //#endregion
5443
5489
  //#region src/alexPlugin.ts
5444
5490
  const alexPlugin = {
5445
5491
  meta: {
5446
5492
  name: "@alextheman/eslint-plugin",
5447
- version: "5.13.0",
5493
+ version: "5.14.0",
5448
5494
  namespace: "alextheman"
5449
5495
  },
5450
5496
  configs: {},
@@ -5458,7 +5504,31 @@ const alexPlugin = {
5458
5504
  "no-skipped-tests": noSkippedTests,
5459
5505
  "standardise-error-messages": standardiseErrorMessages,
5460
5506
  "use-normalized-imports": useNormalizedImports,
5461
- "use-object-shorthand": useObjectShorthand
5507
+ "use-object-shorthand": createRule({
5508
+ name: "use-object-shorthand",
5509
+ meta: {
5510
+ docs: { description: "Encourage the use of object shorthand (e.g. const property = \"Hello\"; const object = { property });" },
5511
+ messages: { useShorthand: "{ {{source}} } is not allowed. Please use the object shorthand." },
5512
+ type: "suggestion",
5513
+ fixable: "code",
5514
+ schema: createRuleSchemaFromZodSchema(useObjectShorthandOptionsSchema)
5515
+ },
5516
+ defaultOptions: [{ fixable: true }],
5517
+ create(context) {
5518
+ const { fixable = true } = parseUseObjectShorthandOptions(context.options[0] ?? { fixable: true });
5519
+ return { Property(node) {
5520
+ if (node.key.type === AST_NODE_TYPES.Identifier && node.value.type === AST_NODE_TYPES.Identifier && node.key.name === node.value.name && !node.shorthand) context.report({
5521
+ node,
5522
+ messageId: "useShorthand",
5523
+ data: { source: context.sourceCode.getText(node) },
5524
+ fix: fixOnCondition(fixable, (fixer) => {
5525
+ const key = node.key;
5526
+ return fixer.replaceTextRange([node.range[0], node.range[1]], key.name);
5527
+ })
5528
+ });
5529
+ } };
5530
+ }
5531
+ })
5462
5532
  }
5463
5533
  };
5464
5534
  alexPlugin.configs = createAlexPluginConfigs(deepFreeze(deepCopy(alexPlugin)));