@alextheman/eslint-plugin 5.4.3 → 5.5.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/dist/index.cjs CHANGED
@@ -61,7 +61,7 @@ eslint_plugin_package_json = __toESM(eslint_plugin_package_json);
61
61
  let eslint_plugin_jsdoc = require("eslint-plugin-jsdoc");
62
62
  eslint_plugin_jsdoc = __toESM(eslint_plugin_jsdoc);
63
63
 
64
- //#region node_modules/.pnpm/globals@17.0.0/node_modules/globals/globals.json
64
+ //#region node_modules/.pnpm/globals@17.2.0/node_modules/globals/globals.json
65
65
  var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
66
66
  module.exports = {
67
67
  "amd": {
@@ -2498,6 +2498,8 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2498
2498
  "spyOn": false,
2499
2499
  "spyOnAllFunctions": false,
2500
2500
  "spyOnProperty": false,
2501
+ "throwUnless": false,
2502
+ "throwUnlessAsync": false,
2501
2503
  "waits": false,
2502
2504
  "waitsFor": false,
2503
2505
  "xdescribe": false,
@@ -2961,6 +2963,28 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2961
2963
  "toint32": false,
2962
2964
  "version": false
2963
2965
  },
2966
+ "rspack": {
2967
+ "__non_webpack_require__": false,
2968
+ "__resourceQuery": false,
2969
+ "__rspack_unique_id__": false,
2970
+ "__rspack_version__": false,
2971
+ "__system_context__": false,
2972
+ "__webpack_base_uri__": true,
2973
+ "__webpack_chunk_load__": true,
2974
+ "__webpack_chunkname__": false,
2975
+ "__webpack_exports_info__": false,
2976
+ "__webpack_get_script_filename__": true,
2977
+ "__webpack_hash__": false,
2978
+ "__webpack_init_sharing__": false,
2979
+ "__webpack_is_included__": false,
2980
+ "__webpack_module__": false,
2981
+ "__webpack_modules__": false,
2982
+ "__webpack_nonce__": true,
2983
+ "__webpack_public_path__": true,
2984
+ "__webpack_require__": false,
2985
+ "__webpack_runtime_id__": false,
2986
+ "__webpack_share_scopes__": false
2987
+ },
2964
2988
  "serviceworker": {
2965
2989
  "AbortController": false,
2966
2990
  "AbortPaymentEvent": false,
@@ -3687,6 +3711,21 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3687
3711
  "chrome": false,
3688
3712
  "opr": false
3689
3713
  },
3714
+ "webpack": {
3715
+ "__non_webpack_require__": false,
3716
+ "__resourceQuery": false,
3717
+ "__webpack_base_uri__": true,
3718
+ "__webpack_chunk_load__": true,
3719
+ "__webpack_exports_info__": false,
3720
+ "__webpack_get_script_filename__": true,
3721
+ "__webpack_hash__": false,
3722
+ "__webpack_is_included__": false,
3723
+ "__webpack_module__": false,
3724
+ "__webpack_modules__": false,
3725
+ "__webpack_public_path__": true,
3726
+ "__webpack_require__": false,
3727
+ "__webpack_runtime_id__": false
3728
+ },
3690
3729
  "worker": {
3691
3730
  "AbortController": false,
3692
3731
  "AbortSignal": false,
@@ -4034,7 +4073,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4034
4073
  }));
4035
4074
 
4036
4075
  //#endregion
4037
- //#region node_modules/.pnpm/globals@17.0.0/node_modules/globals/index.js
4076
+ //#region node_modules/.pnpm/globals@17.2.0/node_modules/globals/index.js
4038
4077
  var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4039
4078
  module.exports = require_globals$1();
4040
4079
  }));
@@ -4105,8 +4144,8 @@ var combineRestrictedImports_default = combineRestrictedImports;
4105
4144
  *
4106
4145
  * @returns An array containing the resulting JSON Schema, formatted for ESLint rule schema compatibility.
4107
4146
  */
4108
- function createRuleSchemaFromZodSchema(schema$1) {
4109
- return [(0, _alextheman_utility.omitProperties)(zod.default.toJSONSchema(schema$1), "$schema")];
4147
+ function createRuleSchemaFromZodSchema(schema) {
4148
+ return [(0, _alextheman_utility.omitProperties)(zod.default.toJSONSchema(schema), "$schema")];
4110
4149
  }
4111
4150
  var createRuleSchemaFromZodSchema_default = createRuleSchemaFromZodSchema;
4112
4151
 
@@ -4340,6 +4379,7 @@ const generalJavaScript = [
4340
4379
  },
4341
4380
  rules: {
4342
4381
  eqeqeq: "error",
4382
+ "import/no-duplicates": ["error", { "prefer-inline": false }],
4343
4383
  "import/no-unresolved": "error",
4344
4384
  "n/file-extension-in-import": [
4345
4385
  "error",
@@ -4551,6 +4591,22 @@ const sortObjects = {
4551
4591
  };
4552
4592
  var sortObjects_default = sortObjects;
4553
4593
 
4594
+ //#endregion
4595
+ //#region src/configs/helpers/sorting/sortNamedImports.ts
4596
+ const sortNamedImports = {
4597
+ fallbackSort: { type: "unsorted" },
4598
+ ignoreAlias: false,
4599
+ ignoreCase: true,
4600
+ newlinesBetween: "ignore",
4601
+ newlinesInside: "ignore",
4602
+ order: "asc",
4603
+ partitionByComment: false,
4604
+ partitionByNewLine: false,
4605
+ specialCharacters: "keep",
4606
+ type: "alphabetical"
4607
+ };
4608
+ var sortNamedImports_default = sortNamedImports;
4609
+
4554
4610
  //#endregion
4555
4611
  //#region src/configs/personal/javaScriptBase.ts
4556
4612
  function personalJavaScript(plugin) {
@@ -4565,6 +4621,7 @@ function personalJavaScript(plugin) {
4565
4621
  name: "@alextheman/personal/javascript",
4566
4622
  plugins: {
4567
4623
  "@alextheman": plugin,
4624
+ import: eslint_plugin_import.default,
4568
4625
  perfectionist: eslint_plugin_perfectionist.default,
4569
4626
  prettier: eslint_plugin_prettier.default
4570
4627
  },
@@ -4577,12 +4634,14 @@ function personalJavaScript(plugin) {
4577
4634
  "declaration",
4578
4635
  { allowArrowFunctions: false }
4579
4636
  ],
4637
+ "import/consistent-type-specifier-style": ["error", "prefer-top-level"],
4580
4638
  "no-else-return": "error",
4581
4639
  "no-implicit-coercion": ["error", { allow: ["!!"] }],
4582
4640
  "operator-assignment": ["error", "always"],
4583
4641
  "perfectionist/sort-classes": ["error", sortClasses_default],
4584
4642
  "perfectionist/sort-exports": ["error", sortExports_default],
4585
4643
  "perfectionist/sort-imports": ["error", sortImports_default],
4644
+ "perfectionist/sort-named-imports": ["error", sortNamedImports_default],
4586
4645
  "prefer-arrow-callback": ["error", { allowNamedFunctions: false }],
4587
4646
  "prefer-destructuring": "error",
4588
4647
  "prefer-template": "error",
@@ -4724,7 +4783,7 @@ const generalTypeScript = [
4724
4783
  name: "@alextheman/general/typescript",
4725
4784
  rules: {
4726
4785
  "@typescript-eslint/consistent-type-exports": "error",
4727
- "@typescript-eslint/consistent-type-imports": "error",
4786
+ "@typescript-eslint/consistent-type-imports": ["error", { fixStyle: "separate-type-imports" }],
4728
4787
  "@typescript-eslint/explicit-member-accessibility": "error",
4729
4788
  "@typescript-eslint/no-deprecated": "warn",
4730
4789
  "@typescript-eslint/no-redeclare": ["error", { ignoreDeclarationMerge: true }],
@@ -4809,10 +4868,10 @@ const eslintPluginRestrictedImports = combineRestrictedImports_default(generalRe
4809
4868
  message: "Do not import the plugin directly from the config files. Please create a function that takes in the plugin and returns the config instead.",
4810
4869
  name: "src/alexPlugin"
4811
4870
  },
4812
- ...["src/index", "src"].map((name$1) => {
4871
+ ...["src/index", "src"].map((name) => {
4813
4872
  return {
4814
4873
  message: "Do not import directly from the index file.",
4815
- name: name$1
4874
+ name
4816
4875
  };
4817
4876
  }),
4818
4877
  {
@@ -5116,8 +5175,8 @@ const consistentTestFunction = createRule_default({
5116
5175
  preference
5117
5176
  },
5118
5177
  fix: fixOnCondition_default(fixable, (fixer) => {
5119
- const importedNames = node.specifiers.map((specifier$1) => {
5120
- return specifier$1.type === _typescript_eslint_utils.AST_NODE_TYPES.ImportSpecifier && specifier$1.imported.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier ? specifier$1.imported.name : "";
5178
+ const importedNames = node.specifiers.map((specifier) => {
5179
+ return specifier.type === _typescript_eslint_utils.AST_NODE_TYPES.ImportSpecifier && specifier.imported.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier ? specifier.imported.name : "";
5121
5180
  });
5122
5181
  if (importedNames.includes("it") && importedNames.includes("test")) {
5123
5182
  const newSpecifiers = getImportSpecifiersAfterRemoving_default(context, node.specifiers, "it");
@@ -5134,8 +5193,8 @@ const consistentTestFunction = createRule_default({
5134
5193
  preference
5135
5194
  },
5136
5195
  fix: fixOnCondition_default(fixable, (fixer) => {
5137
- const importedNames = node.specifiers.map((specifier$1) => {
5138
- return specifier$1.type === _typescript_eslint_utils.AST_NODE_TYPES.ImportSpecifier && specifier$1.imported.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier ? specifier$1.imported.name : "";
5196
+ const importedNames = node.specifiers.map((specifier) => {
5197
+ return specifier.type === _typescript_eslint_utils.AST_NODE_TYPES.ImportSpecifier && specifier.imported.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier ? specifier.imported.name : "";
5139
5198
  });
5140
5199
  if (importedNames.includes("it") && importedNames.includes("test")) {
5141
5200
  const newSpecifiers = getImportSpecifiersAfterRemoving_default(context, node.specifiers, "test");
@@ -5454,7 +5513,7 @@ var rules_default = {
5454
5513
  //#endregion
5455
5514
  //#region package.json
5456
5515
  var name = "@alextheman/eslint-plugin";
5457
- var version = "5.4.3";
5516
+ var version = "5.5.1";
5458
5517
 
5459
5518
  //#endregion
5460
5519
  //#region src/alexPlugin.ts