@alextheman/eslint-plugin 5.11.0 → 5.13.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.js CHANGED
@@ -3,12 +3,11 @@ import { AST_NODE_TYPES, ESLintUtils } from "@typescript-eslint/utils";
3
3
  import z from "zod";
4
4
  import js from "@eslint/js";
5
5
  import prettierConfig$1 from "eslint-config-prettier";
6
- import importPlugin from "eslint-plugin-import";
6
+ import * as tsResolver from "eslint-import-resolver-typescript";
7
+ import importPlugin from "eslint-plugin-import-x";
7
8
  import nodePlugin from "eslint-plugin-n";
8
9
  import perfectionist from "eslint-plugin-perfectionist";
9
10
  import prettierPlugin from "eslint-plugin-prettier";
10
- import tsconfigPaths from "vite-tsconfig-paths";
11
- import { defineConfig } from "vitest/config";
12
11
  import tseslint from "typescript-eslint";
13
12
  import jsxA11y from "eslint-plugin-jsx-a11y";
14
13
  import reactPlugin from "eslint-plugin-react";
@@ -17,7 +16,6 @@ import reactHooksPlugin from "eslint-plugin-react-hooks";
17
16
  import packageJson from "eslint-plugin-package-json";
18
17
  import jsdoc from "eslint-plugin-jsdoc";
19
18
  import { normalizeImportPath } from "@alextheman/utility/node";
20
-
21
19
  //#region \0rolldown/runtime.js
22
20
  var __create = Object.create;
23
21
  var __defProp = Object.defineProperty;
@@ -27,16 +25,12 @@ var __getProtoOf = Object.getPrototypeOf;
27
25
  var __hasOwnProp = Object.prototype.hasOwnProperty;
28
26
  var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
29
27
  var __copyProps = (to, from, except, desc) => {
30
- if (from && typeof from === "object" || typeof from === "function") {
31
- for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
32
- key = keys[i];
33
- if (!__hasOwnProp.call(to, key) && key !== except) {
34
- __defProp(to, key, {
35
- get: ((k) => from[k]).bind(null, key),
36
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
37
- });
38
- }
39
- }
28
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
29
+ key = keys[i];
30
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
31
+ get: ((k) => from[k]).bind(null, key),
32
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
33
+ });
40
34
  }
41
35
  return to;
42
36
  };
@@ -44,7 +38,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
44
38
  value: mod,
45
39
  enumerable: true
46
40
  }) : target, mod));
47
-
48
41
  //#endregion
49
42
  //#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/globals.json
50
43
  var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -4070,20 +4063,17 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4070
4063
  }
4071
4064
  };
4072
4065
  }));
4073
-
4074
4066
  //#endregion
4075
4067
  //#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/index.js
4076
4068
  var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4077
4069
  module.exports = require_globals$1();
4078
4070
  }));
4079
-
4080
4071
  //#endregion
4081
4072
  //#region src/configs/helpers/restrictedImports/generalRestrictedImports.ts
4082
4073
  const generalRestrictedImports = { patterns: [{
4083
4074
  group: ["node_modules"],
4084
4075
  message: "Do not import directly from node_modules."
4085
4076
  }] };
4086
-
4087
4077
  //#endregion
4088
4078
  //#region src/utility/public/checkCallExpression.ts
4089
4079
  /**
@@ -4100,7 +4090,6 @@ const generalRestrictedImports = { patterns: [{
4100
4090
  function checkCallExpression(node, objectName, propertyName) {
4101
4091
  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;
4102
4092
  }
4103
-
4104
4093
  //#endregion
4105
4094
  //#region src/utility/public/combineRestrictedImports.ts
4106
4095
  /**
@@ -4127,7 +4116,6 @@ function combineRestrictedImports(...groups) {
4127
4116
  if (combinedGroup.patterns.length === 0) return omitProperties(combinedGroup, "patterns");
4128
4117
  return combinedGroup;
4129
4118
  }
4130
-
4131
4119
  //#endregion
4132
4120
  //#region src/utility/public/createRuleSchemaFromZodSchema.ts
4133
4121
  /**
@@ -4142,7 +4130,6 @@ function combineRestrictedImports(...groups) {
4142
4130
  function createRuleSchemaFromZodSchema(schema) {
4143
4131
  return [omitProperties(z.toJSONSchema(schema), "$schema")];
4144
4132
  }
4145
-
4146
4133
  //#endregion
4147
4134
  //#region src/utility/public/fixOnCondition.ts
4148
4135
  /**
@@ -4161,14 +4148,12 @@ function fixOnCondition(fixable, fix) {
4161
4148
  return fix(fixer);
4162
4149
  };
4163
4150
  }
4164
-
4165
4151
  //#endregion
4166
4152
  //#region src/utility/private/camelToKebab.ts
4167
4153
  function camelToKebab$1(string) {
4168
4154
  if (string[0] === string[0].toUpperCase()) throw new DataError({ string }, "CAMEL_TO_KEBAB_CONVERSION_ERROR", "camelCase string must start with a lowercase letter.");
4169
4155
  return camelToKebab(string, { preserveConsecutiveCapitals: false });
4170
4156
  }
4171
-
4172
4157
  //#endregion
4173
4158
  //#region src/utility/private/createConfigGroup.ts
4174
4159
  function createConfigGroup(group, configs) {
@@ -4176,7 +4161,6 @@ function createConfigGroup(group, configs) {
4176
4161
  for (const key in configs) newConfigs[`${camelToKebab$1(group)}/${camelToKebab$1(key)}`] = configs[key];
4177
4162
  return newConfigs;
4178
4163
  }
4179
-
4180
4164
  //#endregion
4181
4165
  //#region src/utility/public/flattenConfigs.ts
4182
4166
  /**
@@ -4221,7 +4205,6 @@ function flattenConfigs(config) {
4221
4205
  for (const configGroupEntries of Object.entries(config)) Object.assign(allConfigs, createConfigGroup(...configGroupEntries));
4222
4206
  return allConfigs;
4223
4207
  }
4224
-
4225
4208
  //#endregion
4226
4209
  //#region src/utility/public/getImportSpecifiersAfterRemoving.ts
4227
4210
  /**
@@ -4246,14 +4229,12 @@ function getImportSpecifiersAfterRemoving(context, specifiers, importToRemove) {
4246
4229
  return context.sourceCode.getText(specifier);
4247
4230
  }).join(", ");
4248
4231
  }
4249
-
4250
4232
  //#endregion
4251
4233
  //#region src/configs/helpers/restrictedImports/testsRestrictedImports.ts
4252
4234
  const testsRestrictedImports = combineRestrictedImports(generalRestrictedImports, { paths: [{
4253
4235
  message: "Use test functions from vitest instead.",
4254
4236
  name: "node:test"
4255
4237
  }] });
4256
-
4257
4238
  //#endregion
4258
4239
  //#region src/configs/internal/tests.ts
4259
4240
  var import_globals = /* @__PURE__ */ __toESM(require_globals(), 1);
@@ -4284,7 +4265,6 @@ const internalTests = [{
4284
4265
  "no-restricted-imports": ["error", testsRestrictedImports]
4285
4266
  }
4286
4267
  }];
4287
-
4288
4268
  //#endregion
4289
4269
  //#region src/configs/plugin/base.ts
4290
4270
  function pluginBase(plugin) {
@@ -4298,7 +4278,6 @@ function pluginBase(plugin) {
4298
4278
  }
4299
4279
  }];
4300
4280
  }
4301
-
4302
4281
  //#endregion
4303
4282
  //#region src/configs/plugin/tests.ts
4304
4283
  function pluginTests(plugin) {
@@ -4313,7 +4292,6 @@ function pluginTests(plugin) {
4313
4292
  }
4314
4293
  }];
4315
4294
  }
4316
-
4317
4295
  //#endregion
4318
4296
  //#region src/configs/combined/tests.ts
4319
4297
  function combinedTests(plugin) {
@@ -4323,7 +4301,6 @@ function combinedTests(plugin) {
4323
4301
  ...internalTests
4324
4302
  ];
4325
4303
  }
4326
-
4327
4304
  //#endregion
4328
4305
  //#region src/configs/helpers/javaScriptLanguageOptions.ts
4329
4306
  const javaScriptLanguageOptions = { globals: {
@@ -4331,7 +4308,6 @@ const javaScriptLanguageOptions = { globals: {
4331
4308
  ...import_globals.default.browser,
4332
4309
  ...import_globals.default.vitest
4333
4310
  } };
4334
-
4335
4311
  //#endregion
4336
4312
  //#region src/configs/helpers/unusedVarsIgnorePatterns.ts
4337
4313
  const unusedVarsIgnorePatterns = {
@@ -4339,7 +4315,6 @@ const unusedVarsIgnorePatterns = {
4339
4315
  caughtErrorsIgnorePattern: "^_",
4340
4316
  varsIgnorePattern: "^_"
4341
4317
  };
4342
-
4343
4318
  //#endregion
4344
4319
  //#region src/configs/general/javaScript.ts
4345
4320
  const generalJavaScript = [
@@ -4357,13 +4332,13 @@ const generalJavaScript = [
4357
4332
  languageOptions: javaScriptLanguageOptions,
4358
4333
  name: "@alextheman/general/javascript",
4359
4334
  plugins: {
4360
- import: importPlugin,
4335
+ "import-x": importPlugin,
4361
4336
  n: nodePlugin
4362
4337
  },
4363
4338
  rules: {
4364
4339
  eqeqeq: "error",
4365
- "import/no-duplicates": ["error", { "prefer-inline": false }],
4366
- "import/no-unresolved": "error",
4340
+ "import-x/no-duplicates": ["error", { "prefer-inline": false }],
4341
+ "import-x/no-unresolved": "error",
4367
4342
  "n/file-extension-in-import": [
4368
4343
  "error",
4369
4344
  "always",
@@ -4395,52 +4370,16 @@ const generalJavaScript = [
4395
4370
  "no-useless-return": "error",
4396
4371
  "prefer-const": "error"
4397
4372
  },
4398
- settings: { "import/resolver": { node: true } }
4373
+ settings: { "import-x/resolver": {
4374
+ name: "tsResolver",
4375
+ options: { node: true },
4376
+ resolver: tsResolver
4377
+ } }
4399
4378
  }
4400
4379
  ];
4401
-
4402
4380
  //#endregion
4403
4381
  //#region src/configs/external/prettierConfig.ts
4404
4382
  const prettierConfig = { printWidth: 100 };
4405
-
4406
- //#endregion
4407
- //#region src/configs/external/typeDocConfig.ts
4408
- function typeDocConfig(entryPoints = ["./src/index.ts"]) {
4409
- return {
4410
- disableSources: true,
4411
- entryPoints,
4412
- excludeNotDocumented: true,
4413
- includeVersion: true,
4414
- outputs: [{
4415
- name: "html",
4416
- options: { navigation: {
4417
- excludeReferences: false,
4418
- includeCategories: true,
4419
- includeFolders: true,
4420
- includeGroups: true
4421
- } },
4422
- path: "docs/features/html"
4423
- }, {
4424
- name: "markdown",
4425
- path: "docs/features/markdown"
4426
- }],
4427
- plugin: ["typedoc-plugin-markdown", "typedoc-rhineai-theme"]
4428
- };
4429
- }
4430
-
4431
- //#endregion
4432
- //#region src/configs/external/vitestConfig.ts
4433
- function vitestConfig(environment = "jsdom") {
4434
- return defineConfig({
4435
- plugins: [tsconfigPaths()],
4436
- test: {
4437
- environment,
4438
- globals: true,
4439
- include: ["**/tests/**/*.test.ts"]
4440
- }
4441
- });
4442
- }
4443
-
4444
4383
  //#endregion
4445
4384
  //#region src/configs/helpers/reactLanguageOptions.ts
4446
4385
  const reactLanguageOptions = {
@@ -4448,7 +4387,6 @@ const reactLanguageOptions = {
4448
4387
  globals: import_globals.default.browser,
4449
4388
  parserOptions: { ecmaFeatures: { jsx: true } }
4450
4389
  };
4451
-
4452
4390
  //#endregion
4453
4391
  //#region src/configs/helpers/typeScriptLanguageOptions.ts
4454
4392
  const typeScriptLanguageOptions = {
@@ -4460,7 +4398,6 @@ const typeScriptLanguageOptions = {
4460
4398
  tsconfigRootDir: process.cwd()
4461
4399
  }
4462
4400
  };
4463
-
4464
4401
  //#endregion
4465
4402
  //#region src/configs/helpers/sorting/sortClasses.ts
4466
4403
  const sortClasses = {
@@ -4487,7 +4424,6 @@ const sortClasses = {
4487
4424
  specialCharacters: "keep",
4488
4425
  type: "alphabetical"
4489
4426
  };
4490
-
4491
4427
  //#endregion
4492
4428
  //#region src/configs/helpers/sorting/sortExports.ts
4493
4429
  const sortExports = {
@@ -4507,7 +4443,6 @@ const sortExports = {
4507
4443
  specialCharacters: "keep",
4508
4444
  type: "alphabetical"
4509
4445
  };
4510
-
4511
4446
  //#endregion
4512
4447
  //#region src/configs/helpers/sorting/sortImports.ts
4513
4448
  const sortImports = {
@@ -4546,7 +4481,6 @@ const sortImports = {
4546
4481
  specialCharacters: "keep",
4547
4482
  type: "alphabetical"
4548
4483
  };
4549
-
4550
4484
  //#endregion
4551
4485
  //#region src/configs/helpers/sorting/sortObjects.ts
4552
4486
  const sortObjects = {
@@ -4563,7 +4497,6 @@ const sortObjects = {
4563
4497
  type: "alphabetical",
4564
4498
  useConfigurationIf: {}
4565
4499
  };
4566
-
4567
4500
  //#endregion
4568
4501
  //#region src/configs/helpers/restrictedImports/personalRestrictedImports.ts
4569
4502
  const personalRestrictedImports = combineRestrictedImports(generalRestrictedImports, { paths: [...["fs", "node:fs"].map((name) => {
@@ -4572,7 +4505,6 @@ const personalRestrictedImports = combineRestrictedImports(generalRestrictedImpo
4572
4505
  name
4573
4506
  };
4574
4507
  })] });
4575
-
4576
4508
  //#endregion
4577
4509
  //#region src/configs/helpers/sorting/sortNamedImports.ts
4578
4510
  const sortNamedImports = {
@@ -4587,7 +4519,6 @@ const sortNamedImports = {
4587
4519
  specialCharacters: "keep",
4588
4520
  type: "alphabetical"
4589
4521
  };
4590
-
4591
4522
  //#endregion
4592
4523
  //#region src/configs/internal/javaScript.ts
4593
4524
  function internalJavaScript(plugin) {
@@ -4602,7 +4533,6 @@ function internalJavaScript(plugin) {
4602
4533
  name: "@alextheman/internal/javascript",
4603
4534
  plugins: {
4604
4535
  "@alextheman": plugin,
4605
- import: importPlugin,
4606
4536
  n: nodePlugin,
4607
4537
  perfectionist,
4608
4538
  prettier: prettierPlugin
@@ -4616,7 +4546,6 @@ function internalJavaScript(plugin) {
4616
4546
  "declaration",
4617
4547
  { allowArrowFunctions: false }
4618
4548
  ],
4619
- "import/consistent-type-specifier-style": ["error", "prefer-top-level"],
4620
4549
  "n/no-extraneous-import": "off",
4621
4550
  "no-else-return": "error",
4622
4551
  "no-implicit-coercion": ["error", { allow: ["!!"] }],
@@ -4637,7 +4566,6 @@ function internalJavaScript(plugin) {
4637
4566
  rules: { "@alextheman/no-relative-imports": ["error", { depth: 0 }] }
4638
4567
  }];
4639
4568
  }
4640
-
4641
4569
  //#endregion
4642
4570
  //#region src/configs/combined/javaScript.ts
4643
4571
  function combinedJavaScript(plugin) {
@@ -4649,7 +4577,6 @@ function combinedJavaScript(plugin) {
4649
4577
  ...combinedTests(plugin)
4650
4578
  ];
4651
4579
  }
4652
-
4653
4580
  //#endregion
4654
4581
  //#region src/configs/helpers/eslint-plugin-react-hooks.ts
4655
4582
  const reactHooks = {
@@ -4660,7 +4587,6 @@ const reactHooks = {
4660
4587
  "flat/recommended-latest": reactHooksPlugin.configs.flat["recommended-latest"]
4661
4588
  }
4662
4589
  };
4663
-
4664
4590
  //#endregion
4665
4591
  //#region src/configs/general/react.ts
4666
4592
  const generalReact = [
@@ -4695,14 +4621,12 @@ const generalReact = [
4695
4621
  settings: { react: { version: "detect" } }
4696
4622
  }
4697
4623
  ];
4698
-
4699
4624
  //#endregion
4700
4625
  //#region src/configs/helpers/restrictedImports/reactRestrictedImports.ts
4701
4626
  const reactRestrictedImports = combineRestrictedImports(generalRestrictedImports, { patterns: [{
4702
4627
  message: "Please use `import Component from \"@mui/[package]/Component\"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.",
4703
4628
  regex: "^@mui/[^/]+$"
4704
4629
  }] });
4705
-
4706
4630
  //#endregion
4707
4631
  //#region src/configs/internal/react.ts
4708
4632
  const internalReact = [{
@@ -4721,7 +4645,6 @@ const internalReact = [{
4721
4645
  "react/jsx-boolean-value": "error"
4722
4646
  }
4723
4647
  }];
4724
-
4725
4648
  //#endregion
4726
4649
  //#region src/configs/combined/react.ts
4727
4650
  const combinedReact = [
@@ -4729,7 +4652,6 @@ const combinedReact = [
4729
4652
  ...generalReact,
4730
4653
  ...internalReact
4731
4654
  ];
4732
-
4733
4655
  //#endregion
4734
4656
  //#region src/configs/combined/javaScriptReact.ts
4735
4657
  function combinedJavaScriptReact(plugin) {
@@ -4739,14 +4661,12 @@ function combinedJavaScriptReact(plugin) {
4739
4661
  ...combinedReact
4740
4662
  ];
4741
4663
  }
4742
-
4743
4664
  //#endregion
4744
4665
  //#region src/configs/general/packageJson.ts
4745
4666
  const generalPackageJson = [packageJson.configs.recommended, {
4746
4667
  plugins: { "package-json": packageJson },
4747
4668
  rules: { "package-json/scripts-name-casing": "error" }
4748
4669
  }];
4749
-
4750
4670
  //#endregion
4751
4671
  //#region src/configs/general/typeScript.ts
4752
4672
  const generalTypeScript = [
@@ -4770,7 +4690,6 @@ const generalTypeScript = [
4770
4690
  }
4771
4691
  }
4772
4692
  ];
4773
-
4774
4693
  //#endregion
4775
4694
  //#region src/configs/internal/alexCLine.ts
4776
4695
  function internalAlexCLine(plugin) {
@@ -4789,7 +4708,6 @@ function internalAlexCLine(plugin) {
4789
4708
  }
4790
4709
  ];
4791
4710
  }
4792
-
4793
4711
  //#endregion
4794
4712
  //#region src/configs/helpers/requireJsdocOptions.ts
4795
4713
  const requireJsdocOptions = {
@@ -4800,7 +4718,6 @@ const requireJsdocOptions = {
4800
4718
  MethodDefinition: true
4801
4719
  }
4802
4720
  };
4803
-
4804
4721
  //#endregion
4805
4722
  //#region src/configs/internal/jsdoc.ts
4806
4723
  const internalJsdoc = [jsdoc.configs["flat/recommended-typescript-error"], { rules: {
@@ -4827,7 +4744,6 @@ const internalJsdoc = [jsdoc.configs["flat/recommended-typescript-error"], { rul
4827
4744
  { startLines: 1 }
4828
4745
  ]
4829
4746
  } }];
4830
-
4831
4747
  //#endregion
4832
4748
  //#region src/configs/internal/components.ts
4833
4749
  const internalComponents = [...internalJsdoc, { rules: {
@@ -4836,7 +4752,6 @@ const internalComponents = [...internalJsdoc, { rules: {
4836
4752
  "jsdoc/require-returns": "off",
4837
4753
  "jsdoc/require-tags": "off"
4838
4754
  } }];
4839
-
4840
4755
  //#endregion
4841
4756
  //#region src/configs/helpers/restrictedImports/neurosongsBackEndRestrictedImports.ts
4842
4757
  const neurosongsBackEndRestrictedImports = combineRestrictedImports(personalRestrictedImports, { paths: [
@@ -4855,7 +4770,6 @@ const neurosongsBackEndRestrictedImports = combineRestrictedImports(personalRest
4855
4770
  name: "@neurosongs/prisma-client/prisma"
4856
4771
  }
4857
4772
  ] });
4858
-
4859
4773
  //#endregion
4860
4774
  //#region src/configs/internal/neurosongsBackEnd.ts
4861
4775
  const internalNeurosongsBackEnd = [
@@ -4880,7 +4794,6 @@ const internalNeurosongsBackEnd = [
4880
4794
  ] }
4881
4795
  }
4882
4796
  ];
4883
-
4884
4797
  //#endregion
4885
4798
  //#region src/configs/helpers/restrictedImports/neurosongsFrontEndRestrictedImports.ts
4886
4799
  const neurosongsFrontEndRestrictedImports = combineRestrictedImports(personalRestrictedImports, reactRestrictedImports, {
@@ -4900,7 +4813,6 @@ const neurosongsFrontEndRestrictedImports = combineRestrictedImports(personalRes
4900
4813
  message: "Do not use the Prisma Client directly in the front-end. Query an endpoint from the back-end instead."
4901
4814
  }]
4902
4815
  });
4903
-
4904
4816
  //#endregion
4905
4817
  //#region src/configs/internal/neurosongsFrontEnd.ts
4906
4818
  const internalNeurosongsFrontEnd = [{
@@ -4911,7 +4823,6 @@ const internalNeurosongsFrontEnd = [{
4911
4823
  "no-restricted-imports": ["error", neurosongsFrontEndRestrictedImports]
4912
4824
  }
4913
4825
  }];
4914
-
4915
4826
  //#endregion
4916
4827
  //#region src/configs/internal/typeScript.ts
4917
4828
  function internalTypeScript(plugin) {
@@ -4921,7 +4832,8 @@ function internalTypeScript(plugin) {
4921
4832
  name: "@alextheman/internal/typescript",
4922
4833
  plugins: {
4923
4834
  "@alextheman": plugin,
4924
- "@typescript-eslint": tseslint.plugin
4835
+ "@typescript-eslint": tseslint.plugin,
4836
+ "import-x": importPlugin
4925
4837
  },
4926
4838
  rules: {
4927
4839
  "@alextheman/standardise-error-messages": "off",
@@ -4931,11 +4843,16 @@ function internalTypeScript(plugin) {
4931
4843
  "@typescript-eslint/dot-notation": "error",
4932
4844
  "@typescript-eslint/method-signature-style": ["error", "property"],
4933
4845
  "@typescript-eslint/no-explicit-any": "off",
4934
- "@typescript-eslint/no-redeclare": "off"
4935
- }
4846
+ "@typescript-eslint/no-redeclare": "off",
4847
+ "import-x/consistent-type-specifier-style": ["error", "prefer-top-level"]
4848
+ },
4849
+ settings: { "import-x/resolver": {
4850
+ name: "tsResolver",
4851
+ options: { node: true },
4852
+ resolver: tsResolver
4853
+ } }
4936
4854
  }];
4937
4855
  }
4938
-
4939
4856
  //#endregion
4940
4857
  //#region src/configs/helpers/restrictedImports/eslintPluginRestrictedImports.ts
4941
4858
  const eslintPluginRestrictedImports = combineRestrictedImports(generalRestrictedImports, { paths: [
@@ -4961,7 +4878,6 @@ const eslintPluginRestrictedImports = combineRestrictedImports(generalRestricted
4961
4878
  name: "eslint-vitest-rule-tester"
4962
4879
  }
4963
4880
  ] });
4964
-
4965
4881
  //#endregion
4966
4882
  //#region src/configs/internal/eslintPlugin/base.ts
4967
4883
  function internalEslintPluginBase(plugin) {
@@ -4978,7 +4894,6 @@ function internalEslintPluginBase(plugin) {
4978
4894
  }
4979
4895
  }];
4980
4896
  }
4981
-
4982
4897
  //#endregion
4983
4898
  //#region src/configs/internal/eslintPlugin/configs.ts
4984
4899
  function internalEslintPluginConfigs(plugin) {
@@ -4989,7 +4904,6 @@ function internalEslintPluginConfigs(plugin) {
4989
4904
  rules: { "perfectionist/sort-objects": ["error", sortObjects] }
4990
4905
  }];
4991
4906
  }
4992
-
4993
4907
  //#endregion
4994
4908
  //#region src/configs/internal/eslintPlugin/rules.ts
4995
4909
  function internalEslintPluginRules(plugin) {
@@ -5000,7 +4914,6 @@ function internalEslintPluginRules(plugin) {
5000
4914
  rules: { "perfectionist/sort-objects": ["error", sortObjects] }
5001
4915
  }];
5002
4916
  }
5003
-
5004
4917
  //#endregion
5005
4918
  //#region src/configs/internal/eslintPlugin/utility.ts
5006
4919
  function internalEslintPluginUtility(plugin) {
@@ -5010,7 +4923,6 @@ function internalEslintPluginUtility(plugin) {
5010
4923
  rules: { "jsdoc/require-jsdoc": ["error", requireJsdocOptions] }
5011
4924
  }];
5012
4925
  }
5013
-
5014
4926
  //#endregion
5015
4927
  //#region src/configs/internal/utility/base.ts
5016
4928
  function internalUtilityBase(plugin) {
@@ -5026,13 +4938,11 @@ function internalUtilityBase(plugin) {
5026
4938
  }
5027
4939
  }];
5028
4940
  }
5029
-
5030
4941
  //#endregion
5031
4942
  //#region src/configs/internal/utility/internal.ts
5032
4943
  function internalUtilityRoot$1(plugin) {
5033
4944
  return [...internalUtilityBase(plugin), { rules: { "jsdoc/require-jsdoc": "off" } }];
5034
4945
  }
5035
-
5036
4946
  //#endregion
5037
4947
  //#region src/configs/internal/utility/root.ts
5038
4948
  function internalUtilityRoot(plugin) {
@@ -5041,7 +4951,6 @@ function internalUtilityRoot(plugin) {
5041
4951
  message: "Do not import node builtins from the root of utility. Please either refactor the usage so that the node builtin is not needed, or move this over to the \"@alextheman/utility/node\" entrypoint."
5042
4952
  }] })] } }];
5043
4953
  }
5044
-
5045
4954
  //#endregion
5046
4955
  //#region src/configs/combined/typeScript.ts
5047
4956
  function combinedTypeScript(plugin) {
@@ -5053,7 +4962,6 @@ function combinedTypeScript(plugin) {
5053
4962
  ...internalTypeScript(plugin)
5054
4963
  ];
5055
4964
  }
5056
-
5057
4965
  //#endregion
5058
4966
  //#region src/configs/combined/typeScriptPackage.ts
5059
4967
  function combinedTypeScriptPackage(plugin) {
@@ -5063,7 +4971,6 @@ function combinedTypeScriptPackage(plugin) {
5063
4971
  ...internalJsdoc
5064
4972
  ];
5065
4973
  }
5066
-
5067
4974
  //#endregion
5068
4975
  //#region src/configs/combined/typeScriptReact.ts
5069
4976
  function combinedTypeScriptReact(plugin) {
@@ -5073,7 +4980,6 @@ function combinedTypeScriptReact(plugin) {
5073
4980
  ...combinedReact
5074
4981
  ];
5075
4982
  }
5076
-
5077
4983
  //#endregion
5078
4984
  //#region src/configs/internal/packageJson.ts
5079
4985
  const internalPackageJson = [...generalPackageJson, {
@@ -5083,7 +4989,6 @@ const internalPackageJson = [...generalPackageJson, {
5083
4989
  rangeType: "pin"
5084
4990
  }] }
5085
4991
  }];
5086
-
5087
4992
  //#endregion
5088
4993
  //#region src/configs/index.ts
5089
4994
  function createAlexPluginConfigs(plugin) {
@@ -5128,13 +5033,11 @@ function createAlexPluginConfigs(plugin) {
5128
5033
  }
5129
5034
  });
5130
5035
  }
5131
-
5132
5036
  //#endregion
5133
5037
  //#region src/rules/helpers/createRule.ts
5134
5038
  const createRule = ESLintUtils.RuleCreator((ruleName) => {
5135
5039
  return ruleName;
5136
5040
  });
5137
-
5138
5041
  //#endregion
5139
5042
  //#region src/rules/consistent-test-function.ts
5140
5043
  const validTestFunctionsSchema = z.enum(["test", "it"]);
@@ -5228,7 +5131,6 @@ const consistentTestFunction = createRule({
5228
5131
  };
5229
5132
  }
5230
5133
  });
5231
-
5232
5134
  //#endregion
5233
5135
  //#region src/rules/has-standards.ts
5234
5136
  const hasStandardsOptionsSchema = z.object({ fixable: z.boolean() }).partial();
@@ -5267,7 +5169,6 @@ const hasStandards = createRule({
5267
5169
  } };
5268
5170
  }
5269
5171
  });
5270
-
5271
5172
  //#endregion
5272
5173
  //#region src/rules/no-isolated-tests.ts
5273
5174
  const noIsolatedTests = createRule({
@@ -5289,7 +5190,6 @@ const noIsolatedTests = createRule({
5289
5190
  } };
5290
5191
  }
5291
5192
  });
5292
-
5293
5193
  //#endregion
5294
5194
  //#region src/rules/no-namespace-imports.ts
5295
5195
  const noNamespaceImportsOptionsSchema = z.object({ allow: z.array(z.string()) }).partial();
@@ -5320,7 +5220,6 @@ const noNamespaceImports = createRule({
5320
5220
  } };
5321
5221
  }
5322
5222
  });
5323
-
5324
5223
  //#endregion
5325
5224
  //#region src/rules/no-plugin-configs-access-from-src-configs.ts
5326
5225
  const noPluginConfigAccessFromSrcConfigs = createRule({
@@ -5344,7 +5243,6 @@ const noPluginConfigAccessFromSrcConfigs = createRule({
5344
5243
  } };
5345
5244
  }
5346
5245
  });
5347
-
5348
5246
  //#endregion
5349
5247
  //#region src/rules/no-relative-imports.ts
5350
5248
  const noRelativeImportsOptionsSchema = z.object({ depth: z.int().nonnegative() }).partial();
@@ -5411,7 +5309,6 @@ const noRelativeImports = createRule({
5411
5309
  } };
5412
5310
  }
5413
5311
  });
5414
-
5415
5312
  //#endregion
5416
5313
  //#region src/rules/no-skipped-tests.ts
5417
5314
  const noSkippedTests = createRule({
@@ -5433,7 +5330,6 @@ const noSkippedTests = createRule({
5433
5330
  } };
5434
5331
  }
5435
5332
  });
5436
-
5437
5333
  //#endregion
5438
5334
  //#region src/rules/standardise-error-messages.ts
5439
5335
  const standardiseErrorMessagesOptionsSchema = z.object({ regex: z.string() }).partial();
@@ -5477,7 +5373,6 @@ const standardiseErrorMessages = createRule({
5477
5373
  };
5478
5374
  }
5479
5375
  });
5480
-
5481
5376
  //#endregion
5482
5377
  //#region src/rules/use-normalized-imports.ts
5483
5378
  const useNormalizedImportsOptionsSchema = z.object({ fixable: z.boolean() }).partial();
@@ -5513,7 +5408,6 @@ const useNormalizedImports = createRule({
5513
5408
  } };
5514
5409
  }
5515
5410
  });
5516
-
5517
5411
  //#endregion
5518
5412
  //#region src/rules/use-object-shorthand.ts
5519
5413
  const useObjectShorthandOptionsSchema = z.object({ fixable: z.boolean() }).partial();
@@ -5545,43 +5439,31 @@ const useObjectShorthand = createRule({
5545
5439
  } };
5546
5440
  }
5547
5441
  });
5548
-
5549
- //#endregion
5550
- //#region src/rules/index.ts
5551
- var rules_default = {
5552
- "consistent-test-function": consistentTestFunction,
5553
- "has-standards": hasStandards,
5554
- "no-isolated-tests": noIsolatedTests,
5555
- "no-namespace-imports": noNamespaceImports,
5556
- "no-plugin-configs-access-from-src-configs": noPluginConfigAccessFromSrcConfigs,
5557
- "no-relative-imports": noRelativeImports,
5558
- "no-skipped-tests": noSkippedTests,
5559
- "standardise-error-messages": standardiseErrorMessages,
5560
- "use-normalized-imports": useNormalizedImports,
5561
- "use-object-shorthand": useObjectShorthand
5562
- };
5563
-
5564
- //#endregion
5565
- //#region package.json
5566
- var name = "@alextheman/eslint-plugin";
5567
- var version = "5.11.0";
5568
-
5569
5442
  //#endregion
5570
5443
  //#region src/alexPlugin.ts
5571
5444
  const alexPlugin = {
5572
5445
  meta: {
5573
- name,
5574
- version,
5446
+ name: "@alextheman/eslint-plugin",
5447
+ version: "5.13.0",
5575
5448
  namespace: "alextheman"
5576
5449
  },
5577
5450
  configs: {},
5578
- rules: rules_default
5451
+ rules: {
5452
+ "consistent-test-function": consistentTestFunction,
5453
+ "has-standards": hasStandards,
5454
+ "no-isolated-tests": noIsolatedTests,
5455
+ "no-namespace-imports": noNamespaceImports,
5456
+ "no-plugin-configs-access-from-src-configs": noPluginConfigAccessFromSrcConfigs,
5457
+ "no-relative-imports": noRelativeImports,
5458
+ "no-skipped-tests": noSkippedTests,
5459
+ "standardise-error-messages": standardiseErrorMessages,
5460
+ "use-normalized-imports": useNormalizedImports,
5461
+ "use-object-shorthand": useObjectShorthand
5462
+ }
5579
5463
  };
5580
5464
  alexPlugin.configs = createAlexPluginConfigs(deepFreeze(deepCopy(alexPlugin)));
5581
-
5582
5465
  //#endregion
5583
5466
  //#region src/index.ts
5584
5467
  var src_default = alexPlugin;
5585
-
5586
5468
  //#endregion
5587
- export { checkCallExpression, combineRestrictedImports, createRuleSchemaFromZodSchema, src_default as default, fixOnCondition, flattenConfigs, getImportSpecifiersAfterRemoving, prettierConfig, typeDocConfig, vitestConfig };
5469
+ export { checkCallExpression, combineRestrictedImports, createRuleSchemaFromZodSchema, src_default as default, fixOnCondition, flattenConfigs, getImportSpecifiersAfterRemoving, prettierConfig };