@alextheman/eslint-plugin 5.4.3 → 5.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -45,7 +45,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
45
45
  }) : target, mod));
46
46
 
47
47
  //#endregion
48
- //#region node_modules/.pnpm/globals@17.0.0/node_modules/globals/globals.json
48
+ //#region node_modules/.pnpm/globals@17.1.0/node_modules/globals/globals.json
49
49
  var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
50
50
  module.exports = {
51
51
  "amd": {
@@ -2945,6 +2945,28 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2945
2945
  "toint32": false,
2946
2946
  "version": false
2947
2947
  },
2948
+ "rspack": {
2949
+ "__non_webpack_require__": false,
2950
+ "__resourceQuery": false,
2951
+ "__rspack_unique_id__": false,
2952
+ "__rspack_version__": false,
2953
+ "__system_context__": false,
2954
+ "__webpack_base_uri__": true,
2955
+ "__webpack_chunk_load__": true,
2956
+ "__webpack_chunkname__": false,
2957
+ "__webpack_exports_info__": false,
2958
+ "__webpack_get_script_filename__": true,
2959
+ "__webpack_hash__": false,
2960
+ "__webpack_init_sharing__": false,
2961
+ "__webpack_is_included__": false,
2962
+ "__webpack_module__": false,
2963
+ "__webpack_modules__": false,
2964
+ "__webpack_nonce__": true,
2965
+ "__webpack_public_path__": true,
2966
+ "__webpack_require__": false,
2967
+ "__webpack_runtime_id__": false,
2968
+ "__webpack_share_scopes__": false
2969
+ },
2948
2970
  "serviceworker": {
2949
2971
  "AbortController": false,
2950
2972
  "AbortPaymentEvent": false,
@@ -3671,6 +3693,21 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3671
3693
  "chrome": false,
3672
3694
  "opr": false
3673
3695
  },
3696
+ "webpack": {
3697
+ "__non_webpack_require__": false,
3698
+ "__resourceQuery": false,
3699
+ "__webpack_base_uri__": true,
3700
+ "__webpack_chunk_load__": true,
3701
+ "__webpack_exports_info__": false,
3702
+ "__webpack_get_script_filename__": true,
3703
+ "__webpack_hash__": false,
3704
+ "__webpack_is_included__": false,
3705
+ "__webpack_module__": false,
3706
+ "__webpack_modules__": false,
3707
+ "__webpack_public_path__": true,
3708
+ "__webpack_require__": false,
3709
+ "__webpack_runtime_id__": false
3710
+ },
3674
3711
  "worker": {
3675
3712
  "AbortController": false,
3676
3713
  "AbortSignal": false,
@@ -4018,7 +4055,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4018
4055
  }));
4019
4056
 
4020
4057
  //#endregion
4021
- //#region node_modules/.pnpm/globals@17.0.0/node_modules/globals/index.js
4058
+ //#region node_modules/.pnpm/globals@17.1.0/node_modules/globals/index.js
4022
4059
  var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4023
4060
  module.exports = require_globals$1();
4024
4061
  }));
@@ -4089,8 +4126,8 @@ var combineRestrictedImports_default = combineRestrictedImports;
4089
4126
  *
4090
4127
  * @returns An array containing the resulting JSON Schema, formatted for ESLint rule schema compatibility.
4091
4128
  */
4092
- function createRuleSchemaFromZodSchema(schema$1) {
4093
- return [omitProperties(z.toJSONSchema(schema$1), "$schema")];
4129
+ function createRuleSchemaFromZodSchema(schema) {
4130
+ return [omitProperties(z.toJSONSchema(schema), "$schema")];
4094
4131
  }
4095
4132
  var createRuleSchemaFromZodSchema_default = createRuleSchemaFromZodSchema;
4096
4133
 
@@ -4324,6 +4361,7 @@ const generalJavaScript = [
4324
4361
  },
4325
4362
  rules: {
4326
4363
  eqeqeq: "error",
4364
+ "import/no-duplicates": ["error", { "prefer-inline": false }],
4327
4365
  "import/no-unresolved": "error",
4328
4366
  "n/file-extension-in-import": [
4329
4367
  "error",
@@ -4535,6 +4573,22 @@ const sortObjects = {
4535
4573
  };
4536
4574
  var sortObjects_default = sortObjects;
4537
4575
 
4576
+ //#endregion
4577
+ //#region src/configs/helpers/sorting/sortNamedImports.ts
4578
+ const sortNamedImports = {
4579
+ fallbackSort: { type: "unsorted" },
4580
+ ignoreAlias: false,
4581
+ ignoreCase: true,
4582
+ newlinesBetween: "ignore",
4583
+ newlinesInside: "ignore",
4584
+ order: "asc",
4585
+ partitionByComment: false,
4586
+ partitionByNewLine: false,
4587
+ specialCharacters: "keep",
4588
+ type: "alphabetical"
4589
+ };
4590
+ var sortNamedImports_default = sortNamedImports;
4591
+
4538
4592
  //#endregion
4539
4593
  //#region src/configs/personal/javaScriptBase.ts
4540
4594
  function personalJavaScript(plugin) {
@@ -4567,6 +4621,7 @@ function personalJavaScript(plugin) {
4567
4621
  "perfectionist/sort-classes": ["error", sortClasses_default],
4568
4622
  "perfectionist/sort-exports": ["error", sortExports_default],
4569
4623
  "perfectionist/sort-imports": ["error", sortImports_default],
4624
+ "perfectionist/sort-named-imports": ["error", sortNamedImports_default],
4570
4625
  "prefer-arrow-callback": ["error", { allowNamedFunctions: false }],
4571
4626
  "prefer-destructuring": "error",
4572
4627
  "prefer-template": "error",
@@ -4708,7 +4763,7 @@ const generalTypeScript = [
4708
4763
  name: "@alextheman/general/typescript",
4709
4764
  rules: {
4710
4765
  "@typescript-eslint/consistent-type-exports": "error",
4711
- "@typescript-eslint/consistent-type-imports": "error",
4766
+ "@typescript-eslint/consistent-type-imports": ["error", { fixStyle: "separate-type-imports" }],
4712
4767
  "@typescript-eslint/explicit-member-accessibility": "error",
4713
4768
  "@typescript-eslint/no-deprecated": "warn",
4714
4769
  "@typescript-eslint/no-redeclare": ["error", { ignoreDeclarationMerge: true }],
@@ -4793,10 +4848,10 @@ const eslintPluginRestrictedImports = combineRestrictedImports_default(generalRe
4793
4848
  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.",
4794
4849
  name: "src/alexPlugin"
4795
4850
  },
4796
- ...["src/index", "src"].map((name$1) => {
4851
+ ...["src/index", "src"].map((name) => {
4797
4852
  return {
4798
4853
  message: "Do not import directly from the index file.",
4799
- name: name$1
4854
+ name
4800
4855
  };
4801
4856
  }),
4802
4857
  {
@@ -5100,8 +5155,8 @@ const consistentTestFunction = createRule_default({
5100
5155
  preference
5101
5156
  },
5102
5157
  fix: fixOnCondition_default(fixable, (fixer) => {
5103
- const importedNames = node.specifiers.map((specifier$1) => {
5104
- return specifier$1.type === AST_NODE_TYPES.ImportSpecifier && specifier$1.imported.type === AST_NODE_TYPES.Identifier ? specifier$1.imported.name : "";
5158
+ const importedNames = node.specifiers.map((specifier) => {
5159
+ return specifier.type === AST_NODE_TYPES.ImportSpecifier && specifier.imported.type === AST_NODE_TYPES.Identifier ? specifier.imported.name : "";
5105
5160
  });
5106
5161
  if (importedNames.includes("it") && importedNames.includes("test")) {
5107
5162
  const newSpecifiers = getImportSpecifiersAfterRemoving_default(context, node.specifiers, "it");
@@ -5118,8 +5173,8 @@ const consistentTestFunction = createRule_default({
5118
5173
  preference
5119
5174
  },
5120
5175
  fix: fixOnCondition_default(fixable, (fixer) => {
5121
- const importedNames = node.specifiers.map((specifier$1) => {
5122
- return specifier$1.type === AST_NODE_TYPES.ImportSpecifier && specifier$1.imported.type === AST_NODE_TYPES.Identifier ? specifier$1.imported.name : "";
5176
+ const importedNames = node.specifiers.map((specifier) => {
5177
+ return specifier.type === AST_NODE_TYPES.ImportSpecifier && specifier.imported.type === AST_NODE_TYPES.Identifier ? specifier.imported.name : "";
5123
5178
  });
5124
5179
  if (importedNames.includes("it") && importedNames.includes("test")) {
5125
5180
  const newSpecifiers = getImportSpecifiersAfterRemoving_default(context, node.specifiers, "test");
@@ -5438,7 +5493,7 @@ var rules_default = {
5438
5493
  //#endregion
5439
5494
  //#region package.json
5440
5495
  var name = "@alextheman/eslint-plugin";
5441
- var version = "5.4.3";
5496
+ var version = "5.5.0";
5442
5497
 
5443
5498
  //#endregion
5444
5499
  //#region src/alexPlugin.ts
@@ -7,7 +7,6 @@ import z from "zod";
7
7
  import { RuleContext, RuleFix, RuleFixer } from "@typescript-eslint/utils/ts-eslint";
8
8
 
9
9
  //#region src/utility/public/checkCallExpression.d.ts
10
-
11
10
  /**
12
11
  * Checks if a given node matches the expected object and property names.
13
12
  *
@@ -7,7 +7,6 @@ import { JSONSchema4 } from "@typescript-eslint/utils/json-schema";
7
7
  import { RuleContext, RuleFix, RuleFixer } from "@typescript-eslint/utils/ts-eslint";
8
8
 
9
9
  //#region src/utility/public/checkCallExpression.d.ts
10
-
11
10
  /**
12
11
  * Checks if a given node matches the expected object and property names.
13
12
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/eslint-plugin",
3
- "version": "5.4.3",
3
+ "version": "5.5.0",
4
4
  "description": "A package to provide custom ESLint rules and configs.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -29,48 +29,48 @@
29
29
  "dist"
30
30
  ],
31
31
  "dependencies": {
32
- "@alextheman/utility": "^4.6.0",
33
- "@typescript-eslint/utils": "^8.53.0",
32
+ "@alextheman/utility": "^4.10.2",
33
+ "@typescript-eslint/utils": "^8.53.1",
34
34
  "common-tags": "^1.8.2",
35
- "zod": "^4.3.5"
35
+ "zod": "^4.3.6"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@eslint/js": "^9.39.2",
39
39
  "@types/common-tags": "^1.8.4",
40
40
  "@types/eslint": "^9.6.1",
41
41
  "@types/eslint-plugin-jsx-a11y": "^6.10.1",
42
- "@types/node": "^25.0.9",
43
- "@typescript-eslint/rule-tester": "^8.53.0",
44
- "@typescript-eslint/types": "^8.53.0",
45
- "alex-c-line": "^1.19.1",
42
+ "@types/node": "^25.0.10",
43
+ "@typescript-eslint/rule-tester": "^8.53.1",
44
+ "@typescript-eslint/types": "^8.53.1",
45
+ "alex-c-line": "^1.21.1",
46
46
  "dotenv-cli": "^11.0.0",
47
47
  "eslint": "^9.39.2",
48
48
  "eslint-config-prettier": "^10.1.8",
49
49
  "eslint-import-resolver-typescript": "^4.4.4",
50
50
  "eslint-plugin-import": "^2.32.0",
51
- "eslint-plugin-jsdoc": "^62.0.0",
51
+ "eslint-plugin-jsdoc": "^62.4.0",
52
52
  "eslint-plugin-jsx-a11y": "^6.10.2",
53
53
  "eslint-plugin-n": "^17.23.2",
54
54
  "eslint-plugin-package-json": "^0.88.1",
55
- "eslint-plugin-perfectionist": "^5.3.1",
55
+ "eslint-plugin-perfectionist": "^5.4.0",
56
56
  "eslint-plugin-prettier": "^5.5.5",
57
57
  "eslint-plugin-react": "^7.37.5",
58
58
  "eslint-plugin-react-hooks": "^7.0.1",
59
59
  "eslint-plugin-react-refresh": "^0.4.26",
60
60
  "eslint-vitest-rule-tester": "^3.0.1",
61
- "globals": "^17.0.0",
61
+ "globals": "^17.1.0",
62
62
  "husky": "^9.1.7",
63
63
  "jsdom": "^27.4.0",
64
- "prettier": "^3.8.0",
65
- "tsdown": "^0.18.4",
64
+ "prettier": "^3.8.1",
65
+ "tsdown": "^0.20.1",
66
66
  "tsx": "^4.21.0",
67
67
  "typedoc": "^0.28.16",
68
68
  "typedoc-plugin-markdown": "^4.9.0",
69
69
  "typedoc-rhineai-theme": "^1.2.0",
70
70
  "typescript": "^5.9.3",
71
- "typescript-eslint": "^8.53.0",
71
+ "typescript-eslint": "^8.53.1",
72
72
  "vite-tsconfig-paths": "^6.0.4",
73
- "vitest": "^4.0.17"
73
+ "vitest": "^4.0.18"
74
74
  },
75
75
  "peerDependencies": {
76
76
  "@eslint/js": ">=9.0.0",
@@ -98,9 +98,7 @@
98
98
  "build": "tsdown",
99
99
  "create-feature-docs": "typedoc",
100
100
  "create-local-package": "pnpm run build && rm -f alextheman-eslint-plugin-*.tgz && pnpm pack",
101
- "create-release-note-major": "git pull origin main && alex-c-line create-release-note major",
102
- "create-release-note-minor": "git pull origin main && alex-c-line create-release-note minor",
103
- "create-release-note-patch": "git pull origin main && alex-c-line create-release-note patch",
101
+ "create-release-note": "bash -c 'git pull origin main && alex-c-line create-release-note-2 $@' --",
104
102
  "format": "pnpm run format-prettier && pnpm run format-eslint",
105
103
  "format-and-build": "tsx src/utility/checkConfigChanges.ts || pnpm run build && pnpm run format",
106
104
  "format-eslint": "eslint --fix --suppress-all \"src/**/*.ts\" \"tests/**/*.ts\" \"package.json\" && rm -f eslint-suppressions.json",
@@ -117,12 +115,9 @@
117
115
  "lint-prettier-yml": "prettier --check \"./**/*.{yml,yaml}\"",
118
116
  "lint-tsc": "tsc --noEmit",
119
117
  "pre-commit": "alex-c-line pre-commit-2",
120
- "prepare-live-utility": "pnpm uninstall @alextheman/utility && pnpm install @alextheman/utility",
121
- "prepare-local-utility": "dotenv -e .env -- sh -c 'UTILITY_PATH=${LOCAL_UTILITY_PATH:-../utility}; pnpm --dir \"$UTILITY_PATH\" run build && pnpm uninstall @alextheman/utility && pnpm install file:\"$UTILITY_PATH\"'",
122
118
  "test": "vitest run",
123
119
  "test-watch": "vitest",
124
120
  "update-dependencies": "pnpm update --latest && pnpm update",
125
- "use-live-utility": "pnpm run prepare-live-utility",
126
- "use-local-utility": "pnpm run prepare-local-utility"
121
+ "use-local-package": "bash -c 'alex-c-line use-local-package $@' --"
127
122
  }
128
123
  }