@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.
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
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;
@@ -8,16 +8,12 @@ var __getProtoOf = Object.getPrototypeOf;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
9
  var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
10
10
  var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
13
- key = keys[i];
14
- if (!__hasOwnProp.call(to, key) && key !== except) {
15
- __defProp(to, key, {
16
- get: ((k) => from[k]).bind(null, key),
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,56 +21,9 @@ 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
- let vite_tsconfig_paths = require("vite-tsconfig-paths");
31
- vite_tsconfig_paths = __toESM(vite_tsconfig_paths);
32
- let vitest_config = require("vitest/config");
33
25
  let typescript_eslint = require("typescript-eslint");
34
26
  typescript_eslint = __toESM(typescript_eslint);
35
-
36
- //#region src/configs/external/prettierConfig.ts
37
- const prettierConfig = { printWidth: 100 };
38
-
39
- //#endregion
40
- //#region src/configs/external/typeDocConfig.ts
41
- function typeDocConfig(entryPoints = ["./src/index.ts"]) {
42
- return {
43
- disableSources: true,
44
- entryPoints,
45
- excludeNotDocumented: true,
46
- includeVersion: true,
47
- outputs: [{
48
- name: "html",
49
- options: { navigation: {
50
- excludeReferences: false,
51
- includeCategories: true,
52
- includeFolders: true,
53
- includeGroups: true
54
- } },
55
- path: "docs/features/html"
56
- }, {
57
- name: "markdown",
58
- path: "docs/features/markdown"
59
- }],
60
- plugin: ["typedoc-plugin-markdown", "typedoc-rhineai-theme"]
61
- };
62
- }
63
-
64
- //#endregion
65
- //#region src/configs/external/vitestConfig.ts
66
- function vitestConfig(environment = "jsdom") {
67
- return (0, vitest_config.defineConfig)({
68
- plugins: [(0, vite_tsconfig_paths.default)()],
69
- test: {
70
- environment,
71
- globals: true,
72
- include: ["**/tests/**/*.test.ts"]
73
- }
74
- });
75
- }
76
-
77
- //#endregion
78
27
  //#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/globals.json
79
28
  var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
80
29
  module.exports = {
@@ -4099,22 +4048,13 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4099
4048
  }
4100
4049
  };
4101
4050
  }));
4102
-
4103
- //#endregion
4104
- //#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/index.js
4105
- var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4106
- module.exports = require_globals$1();
4107
- }));
4108
-
4109
- //#endregion
4110
- //#region src/configs/helpers/reactLanguageOptions.ts
4111
- var import_globals = /* @__PURE__ */ __toESM(require_globals(), 1);
4112
4051
  const reactLanguageOptions = {
4113
4052
  ecmaVersion: 2020,
4114
- globals: import_globals.default.browser,
4053
+ globals: (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
4054
+ module.exports = require_globals$1();
4055
+ })))(), 1)).default.browser,
4115
4056
  parserOptions: { ecmaFeatures: { jsx: true } }
4116
4057
  };
4117
-
4118
4058
  //#endregion
4119
4059
  //#region src/configs/helpers/typeScriptLanguageOptions.ts
4120
4060
  const typeScriptLanguageOptions = {
@@ -4126,7 +4066,6 @@ const typeScriptLanguageOptions = {
4126
4066
  tsconfigRootDir: process.cwd()
4127
4067
  }
4128
4068
  };
4129
-
4130
4069
  //#endregion
4131
4070
  //#region src/configs/helpers/unusedVarsIgnorePatterns.ts
4132
4071
  const unusedVarsIgnorePatterns = {
@@ -4134,7 +4073,6 @@ const unusedVarsIgnorePatterns = {
4134
4073
  caughtErrorsIgnorePattern: "^_",
4135
4074
  varsIgnorePattern: "^_"
4136
4075
  };
4137
-
4138
4076
  //#endregion
4139
4077
  //#region src/configs/helpers/sorting/sortClasses.ts
4140
4078
  const sortClasses = {
@@ -4161,7 +4099,6 @@ const sortClasses = {
4161
4099
  specialCharacters: "keep",
4162
4100
  type: "alphabetical"
4163
4101
  };
4164
-
4165
4102
  //#endregion
4166
4103
  //#region src/configs/helpers/sorting/sortExports.ts
4167
4104
  const sortExports = {
@@ -4181,7 +4118,6 @@ const sortExports = {
4181
4118
  specialCharacters: "keep",
4182
4119
  type: "alphabetical"
4183
4120
  };
4184
-
4185
4121
  //#endregion
4186
4122
  //#region src/configs/helpers/sorting/sortImports.ts
4187
4123
  const sortImports = {
@@ -4220,7 +4156,6 @@ const sortImports = {
4220
4156
  specialCharacters: "keep",
4221
4157
  type: "alphabetical"
4222
4158
  };
4223
-
4224
4159
  //#endregion
4225
4160
  //#region src/configs/helpers/sorting/sortObjects.ts
4226
4161
  const sortObjects = {
@@ -4237,15 +4172,11 @@ const sortObjects = {
4237
4172
  type: "alphabetical",
4238
4173
  useConfigurationIf: {}
4239
4174
  };
4240
-
4241
4175
  //#endregion
4242
- exports.prettierConfig = prettierConfig;
4243
4176
  exports.reactLanguageOptions = reactLanguageOptions;
4244
4177
  exports.sortClasses = sortClasses;
4245
4178
  exports.sortExports = sortExports;
4246
4179
  exports.sortImports = sortImports;
4247
4180
  exports.sortObjects = sortObjects;
4248
- exports.typeDocConfig = typeDocConfig;
4249
4181
  exports.typeScriptLanguageOptions = typeScriptLanguageOptions;
4250
4182
  exports.unusedVarsIgnorePatterns = unusedVarsIgnorePatterns;
4251
- exports.vitestConfig = vitestConfig;
@@ -1,19 +1,5 @@
1
- import { Config } from "prettier";
2
- import { TypeDocOptions } from "typedoc";
3
- import { PluginOptions } from "typedoc-plugin-markdown";
4
- import * as vite from "vite";
5
- import { VitestEnvironment } from "vitest/node";
6
1
  import { Linter } from "eslint";
7
2
 
8
- //#region src/configs/external/prettierConfig.d.ts
9
- declare const prettierConfig: Config;
10
- //#endregion
11
- //#region src/configs/external/typeDocConfig.d.ts
12
- declare function typeDocConfig(entryPoints?: Array<string>): TypeDocOptions & PluginOptions;
13
- //#endregion
14
- //#region src/configs/external/vitestConfig.d.ts
15
- declare function vitestConfig(environment?: VitestEnvironment): vite.UserConfig;
16
- //#endregion
17
3
  //#region src/configs/helpers/reactLanguageOptions.d.ts
18
4
  declare const reactLanguageOptions: Linter.LanguageOptions;
19
5
  //#endregion
@@ -171,4 +157,4 @@ interface NoRestrictedImportsOptionsPathsAndPatterns {
171
157
  */
172
158
  type NoRestrictedImportsOptions = NoRestrictedImportsOptionsPathsOnly | NoRestrictedImportsOptionsPatternsOnly | NoRestrictedImportsOptionsPathsAndPatterns;
173
159
  //#endregion
174
- export { type NoRestrictedImportsOptions, type RestrictedPathImport, type RestrictedPatternImport, prettierConfig, reactLanguageOptions, sortClasses, sortExports, sortImports, sortObjects, typeDocConfig, typeScriptLanguageOptions, unusedVarsIgnorePatterns, vitestConfig };
160
+ export { type NoRestrictedImportsOptions, type RestrictedPathImport, type RestrictedPatternImport, reactLanguageOptions, sortClasses, sortExports, sortImports, sortObjects, typeScriptLanguageOptions, unusedVarsIgnorePatterns };
@@ -1,19 +1,5 @@
1
- import { Config } from "prettier";
2
- import { TypeDocOptions } from "typedoc";
3
- import { PluginOptions } from "typedoc-plugin-markdown";
4
- import * as vite from "vite";
5
- import { VitestEnvironment } from "vitest/node";
6
1
  import { Linter } from "eslint";
7
2
 
8
- //#region src/configs/external/prettierConfig.d.ts
9
- declare const prettierConfig: Config;
10
- //#endregion
11
- //#region src/configs/external/typeDocConfig.d.ts
12
- declare function typeDocConfig(entryPoints?: Array<string>): TypeDocOptions & PluginOptions;
13
- //#endregion
14
- //#region src/configs/external/vitestConfig.d.ts
15
- declare function vitestConfig(environment?: VitestEnvironment): vite.UserConfig;
16
- //#endregion
17
3
  //#region src/configs/helpers/reactLanguageOptions.d.ts
18
4
  declare const reactLanguageOptions: Linter.LanguageOptions;
19
5
  //#endregion
@@ -171,4 +157,4 @@ interface NoRestrictedImportsOptionsPathsAndPatterns {
171
157
  */
172
158
  type NoRestrictedImportsOptions = NoRestrictedImportsOptionsPathsOnly | NoRestrictedImportsOptionsPatternsOnly | NoRestrictedImportsOptionsPathsAndPatterns;
173
159
  //#endregion
174
- export { type NoRestrictedImportsOptions, type RestrictedPathImport, type RestrictedPatternImport, prettierConfig, reactLanguageOptions, sortClasses, sortExports, sortImports, sortObjects, typeDocConfig, typeScriptLanguageOptions, unusedVarsIgnorePatterns, vitestConfig };
160
+ export { type NoRestrictedImportsOptions, type RestrictedPathImport, type RestrictedPatternImport, reactLanguageOptions, sortClasses, sortExports, sortImports, sortObjects, typeScriptLanguageOptions, unusedVarsIgnorePatterns };
@@ -1,7 +1,4 @@
1
- import tsconfigPaths from "vite-tsconfig-paths";
2
- import { defineConfig } from "vitest/config";
3
1
  import tseslint from "typescript-eslint";
4
-
5
2
  //#region \0rolldown/runtime.js
6
3
  var __create = Object.create;
7
4
  var __defProp = Object.defineProperty;
@@ -11,16 +8,12 @@ var __getProtoOf = Object.getPrototypeOf;
11
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
12
9
  var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
13
10
  var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
16
- key = keys[i];
17
- if (!__hasOwnProp.call(to, key) && key !== except) {
18
- __defProp(to, key, {
19
- get: ((k) => from[k]).bind(null, key),
20
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
21
- });
22
- }
23
- }
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
+ });
24
17
  }
25
18
  return to;
26
19
  };
@@ -28,49 +21,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
21
  value: mod,
29
22
  enumerable: true
30
23
  }) : target, mod));
31
-
32
- //#endregion
33
- //#region src/configs/external/prettierConfig.ts
34
- const prettierConfig = { printWidth: 100 };
35
-
36
- //#endregion
37
- //#region src/configs/external/typeDocConfig.ts
38
- function typeDocConfig(entryPoints = ["./src/index.ts"]) {
39
- return {
40
- disableSources: true,
41
- entryPoints,
42
- excludeNotDocumented: true,
43
- includeVersion: true,
44
- outputs: [{
45
- name: "html",
46
- options: { navigation: {
47
- excludeReferences: false,
48
- includeCategories: true,
49
- includeFolders: true,
50
- includeGroups: true
51
- } },
52
- path: "docs/features/html"
53
- }, {
54
- name: "markdown",
55
- path: "docs/features/markdown"
56
- }],
57
- plugin: ["typedoc-plugin-markdown", "typedoc-rhineai-theme"]
58
- };
59
- }
60
-
61
- //#endregion
62
- //#region src/configs/external/vitestConfig.ts
63
- function vitestConfig(environment = "jsdom") {
64
- return defineConfig({
65
- plugins: [tsconfigPaths()],
66
- test: {
67
- environment,
68
- globals: true,
69
- include: ["**/tests/**/*.test.ts"]
70
- }
71
- });
72
- }
73
-
74
24
  //#endregion
75
25
  //#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/globals.json
76
26
  var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -4096,22 +4046,13 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4096
4046
  }
4097
4047
  };
4098
4048
  }));
4099
-
4100
- //#endregion
4101
- //#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/index.js
4102
- var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4103
- module.exports = require_globals$1();
4104
- }));
4105
-
4106
- //#endregion
4107
- //#region src/configs/helpers/reactLanguageOptions.ts
4108
- var import_globals = /* @__PURE__ */ __toESM(require_globals(), 1);
4109
4049
  const reactLanguageOptions = {
4110
4050
  ecmaVersion: 2020,
4111
- globals: import_globals.default.browser,
4051
+ globals: (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
4052
+ module.exports = require_globals$1();
4053
+ })))(), 1)).default.browser,
4112
4054
  parserOptions: { ecmaFeatures: { jsx: true } }
4113
4055
  };
4114
-
4115
4056
  //#endregion
4116
4057
  //#region src/configs/helpers/typeScriptLanguageOptions.ts
4117
4058
  const typeScriptLanguageOptions = {
@@ -4123,7 +4064,6 @@ const typeScriptLanguageOptions = {
4123
4064
  tsconfigRootDir: process.cwd()
4124
4065
  }
4125
4066
  };
4126
-
4127
4067
  //#endregion
4128
4068
  //#region src/configs/helpers/unusedVarsIgnorePatterns.ts
4129
4069
  const unusedVarsIgnorePatterns = {
@@ -4131,7 +4071,6 @@ const unusedVarsIgnorePatterns = {
4131
4071
  caughtErrorsIgnorePattern: "^_",
4132
4072
  varsIgnorePattern: "^_"
4133
4073
  };
4134
-
4135
4074
  //#endregion
4136
4075
  //#region src/configs/helpers/sorting/sortClasses.ts
4137
4076
  const sortClasses = {
@@ -4158,7 +4097,6 @@ const sortClasses = {
4158
4097
  specialCharacters: "keep",
4159
4098
  type: "alphabetical"
4160
4099
  };
4161
-
4162
4100
  //#endregion
4163
4101
  //#region src/configs/helpers/sorting/sortExports.ts
4164
4102
  const sortExports = {
@@ -4178,7 +4116,6 @@ const sortExports = {
4178
4116
  specialCharacters: "keep",
4179
4117
  type: "alphabetical"
4180
4118
  };
4181
-
4182
4119
  //#endregion
4183
4120
  //#region src/configs/helpers/sorting/sortImports.ts
4184
4121
  const sortImports = {
@@ -4217,7 +4154,6 @@ const sortImports = {
4217
4154
  specialCharacters: "keep",
4218
4155
  type: "alphabetical"
4219
4156
  };
4220
-
4221
4157
  //#endregion
4222
4158
  //#region src/configs/helpers/sorting/sortObjects.ts
4223
4159
  const sortObjects = {
@@ -4234,6 +4170,5 @@ const sortObjects = {
4234
4170
  type: "alphabetical",
4235
4171
  useConfigurationIf: {}
4236
4172
  };
4237
-
4238
4173
  //#endregion
4239
- export { prettierConfig, reactLanguageOptions, sortClasses, sortExports, sortImports, sortObjects, typeDocConfig, typeScriptLanguageOptions, unusedVarsIgnorePatterns, vitestConfig };
4174
+ export { reactLanguageOptions, sortClasses, sortExports, sortImports, sortObjects, typeScriptLanguageOptions, unusedVarsIgnorePatterns };
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
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
- 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) {
14
- __defProp(to, key, {
15
- get: ((k) => from[k]).bind(null, key),
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,11 @@ 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
27
  zod = __toESM(zod);
33
-
34
28
  //#region src/utility/public/checkCallExpression.ts
35
29
  /**
36
30
  * Checks if a given node matches the expected object and property names.
@@ -46,7 +40,6 @@ zod = __toESM(zod);
46
40
  function checkCallExpression(node, objectName, propertyName) {
47
41
  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
42
  }
49
-
50
43
  //#endregion
51
44
  //#region src/utility/public/combineRestrictedImports.ts
52
45
  /**
@@ -73,7 +66,6 @@ function combineRestrictedImports(...groups) {
73
66
  if (combinedGroup.patterns.length === 0) return (0, _alextheman_utility.omitProperties)(combinedGroup, "patterns");
74
67
  return combinedGroup;
75
68
  }
76
-
77
69
  //#endregion
78
70
  //#region src/utility/public/createRuleSchemaFromZodSchema.ts
79
71
  /**
@@ -88,7 +80,6 @@ function combineRestrictedImports(...groups) {
88
80
  function createRuleSchemaFromZodSchema(schema) {
89
81
  return [(0, _alextheman_utility.omitProperties)(zod.default.toJSONSchema(schema), "$schema")];
90
82
  }
91
-
92
83
  //#endregion
93
84
  //#region src/utility/public/fixOnCondition.ts
94
85
  /**
@@ -107,14 +98,12 @@ function fixOnCondition(fixable, fix) {
107
98
  return fix(fixer);
108
99
  };
109
100
  }
110
-
111
101
  //#endregion
112
102
  //#region src/utility/private/camelToKebab.ts
113
103
  function camelToKebab(string) {
114
104
  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.");
115
105
  return (0, _alextheman_utility.camelToKebab)(string, { preserveConsecutiveCapitals: false });
116
106
  }
117
-
118
107
  //#endregion
119
108
  //#region src/utility/private/createConfigGroup.ts
120
109
  function createConfigGroup(group, configs) {
@@ -122,7 +111,6 @@ function createConfigGroup(group, configs) {
122
111
  for (const key in configs) newConfigs[`${camelToKebab(group)}/${camelToKebab(key)}`] = configs[key];
123
112
  return newConfigs;
124
113
  }
125
-
126
114
  //#endregion
127
115
  //#region src/utility/public/flattenConfigs.ts
128
116
  /**
@@ -167,7 +155,6 @@ function flattenConfigs(config) {
167
155
  for (const configGroupEntries of Object.entries(config)) Object.assign(allConfigs, createConfigGroup(...configGroupEntries));
168
156
  return allConfigs;
169
157
  }
170
-
171
158
  //#endregion
172
159
  //#region src/utility/public/getImportSpecifiersAfterRemoving.ts
173
160
  /**
@@ -192,11 +179,10 @@ function getImportSpecifiersAfterRemoving(context, specifiers, importToRemove) {
192
179
  return context.sourceCode.getText(specifier);
193
180
  }).join(", ");
194
181
  }
195
-
196
182
  //#endregion
197
183
  exports.checkCallExpression = checkCallExpression;
198
184
  exports.combineRestrictedImports = combineRestrictedImports;
199
185
  exports.createRuleSchemaFromZodSchema = createRuleSchemaFromZodSchema;
200
186
  exports.fixOnCondition = fixOnCondition;
201
187
  exports.flattenConfigs = flattenConfigs;
202
- exports.getImportSpecifiersAfterRemoving = getImportSpecifiersAfterRemoving;
188
+ exports.getImportSpecifiersAfterRemoving = getImportSpecifiersAfterRemoving;
@@ -1,7 +1,6 @@
1
1
  import { AST_NODE_TYPES } from "@typescript-eslint/utils";
2
2
  import { DataError, camelToKebab, omitProperties } from "@alextheman/utility";
3
3
  import z from "zod";
4
-
5
4
  //#region src/utility/public/checkCallExpression.ts
6
5
  /**
7
6
  * Checks if a given node matches the expected object and property names.
@@ -17,7 +16,6 @@ import z from "zod";
17
16
  function checkCallExpression(node, objectName, propertyName) {
18
17
  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
18
  }
20
-
21
19
  //#endregion
22
20
  //#region src/utility/public/combineRestrictedImports.ts
23
21
  /**
@@ -44,7 +42,6 @@ function combineRestrictedImports(...groups) {
44
42
  if (combinedGroup.patterns.length === 0) return omitProperties(combinedGroup, "patterns");
45
43
  return combinedGroup;
46
44
  }
47
-
48
45
  //#endregion
49
46
  //#region src/utility/public/createRuleSchemaFromZodSchema.ts
50
47
  /**
@@ -59,7 +56,6 @@ function combineRestrictedImports(...groups) {
59
56
  function createRuleSchemaFromZodSchema(schema) {
60
57
  return [omitProperties(z.toJSONSchema(schema), "$schema")];
61
58
  }
62
-
63
59
  //#endregion
64
60
  //#region src/utility/public/fixOnCondition.ts
65
61
  /**
@@ -78,14 +74,12 @@ function fixOnCondition(fixable, fix) {
78
74
  return fix(fixer);
79
75
  };
80
76
  }
81
-
82
77
  //#endregion
83
78
  //#region src/utility/private/camelToKebab.ts
84
79
  function camelToKebab$1(string) {
85
80
  if (string[0] === string[0].toUpperCase()) throw new DataError({ string }, "CAMEL_TO_KEBAB_CONVERSION_ERROR", "camelCase string must start with a lowercase letter.");
86
81
  return camelToKebab(string, { preserveConsecutiveCapitals: false });
87
82
  }
88
-
89
83
  //#endregion
90
84
  //#region src/utility/private/createConfigGroup.ts
91
85
  function createConfigGroup(group, configs) {
@@ -93,7 +87,6 @@ function createConfigGroup(group, configs) {
93
87
  for (const key in configs) newConfigs[`${camelToKebab$1(group)}/${camelToKebab$1(key)}`] = configs[key];
94
88
  return newConfigs;
95
89
  }
96
-
97
90
  //#endregion
98
91
  //#region src/utility/public/flattenConfigs.ts
99
92
  /**
@@ -138,7 +131,6 @@ function flattenConfigs(config) {
138
131
  for (const configGroupEntries of Object.entries(config)) Object.assign(allConfigs, createConfigGroup(...configGroupEntries));
139
132
  return allConfigs;
140
133
  }
141
-
142
134
  //#endregion
143
135
  //#region src/utility/public/getImportSpecifiersAfterRemoving.ts
144
136
  /**
@@ -163,6 +155,5 @@ function getImportSpecifiersAfterRemoving(context, specifiers, importToRemove) {
163
155
  return context.sourceCode.getText(specifier);
164
156
  }).join(", ");
165
157
  }
166
-
167
158
  //#endregion
168
- export { checkCallExpression, combineRestrictedImports, createRuleSchemaFromZodSchema, fixOnCondition, flattenConfigs, getImportSpecifiersAfterRemoving };
159
+ export { checkCallExpression, combineRestrictedImports, createRuleSchemaFromZodSchema, fixOnCondition, flattenConfigs, getImportSpecifiersAfterRemoving };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/eslint-plugin",
3
- "version": "5.11.0",
3
+ "version": "5.13.0",
4
4
  "description": "A package to provide custom ESLint rules and configs.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,12 +34,12 @@
34
34
  "dist"
35
35
  ],
36
36
  "dependencies": {
37
- "@alextheman/utility": "5.8.0",
38
- "@eslint/compat": "2.0.3",
39
- "@typescript-eslint/types": "8.58.0",
40
- "@typescript-eslint/utils": "8.58.0",
37
+ "@alextheman/utility": "5.11.0",
38
+ "@eslint/compat": "2.0.5",
39
+ "@typescript-eslint/types": "8.58.1",
40
+ "@typescript-eslint/utils": "8.58.1",
41
41
  "common-tags": "1.8.2",
42
- "prettier": "3.8.1",
42
+ "prettier": "3.8.2",
43
43
  "zod": "4.3.6"
44
44
  },
45
45
  "devDependencies": {
@@ -47,19 +47,20 @@
47
47
  "@types/common-tags": "1.8.4",
48
48
  "@types/eslint": "9.6.1",
49
49
  "@types/eslint-plugin-jsx-a11y": "6.10.1",
50
- "@types/node": "25.5.0",
51
- "@typescript-eslint/rule-tester": "8.58.0",
52
- "alex-c-line": "2.4.0",
50
+ "@types/node": "25.6.0",
51
+ "@typescript-eslint/rule-tester": "8.58.1",
52
+ "alex-c-line": "2.6.1",
53
53
  "dotenv-cli": "11.0.0",
54
- "eslint": "10.1.0",
54
+ "eslint": "10.2.0",
55
55
  "eslint-config-prettier": "10.1.8",
56
56
  "eslint-import-resolver-typescript": "4.4.4",
57
- "eslint-plugin-import": "2.32.0",
58
- "eslint-plugin-jsdoc": "62.8.1",
57
+ "eslint-plugin-import-x": "4.16.2",
58
+ "eslint-plugin-jsdoc": "62.9.0",
59
59
  "eslint-plugin-jsx-a11y": "6.10.2",
60
+ "eslint-plugin-markdownlint": "0.9.0",
60
61
  "eslint-plugin-n": "17.24.0",
61
62
  "eslint-plugin-package-json": "0.91.1",
62
- "eslint-plugin-perfectionist": "5.7.0",
63
+ "eslint-plugin-perfectionist": "5.8.0",
63
64
  "eslint-plugin-prettier": "5.5.5",
64
65
  "eslint-plugin-react": "7.37.5",
65
66
  "eslint-plugin-react-hooks": "7.0.1",
@@ -68,26 +69,25 @@
68
69
  "execa": "9.6.1",
69
70
  "globals": "17.4.0",
70
71
  "husky": "9.1.7",
71
- "jsdom": "29.0.1",
72
+ "jsdom": "29.0.2",
73
+ "markdownlint-cli2": "0.22.0",
72
74
  "tempy": "3.2.0",
73
- "tsdown": "0.20.3",
75
+ "tsdown": "0.21.7",
74
76
  "tsx": "4.21.0",
75
- "typedoc": "0.28.18",
76
- "typedoc-plugin-markdown": "4.11.0",
77
- "typedoc-rhineai-theme": "1.2.0",
78
77
  "typescript": "6.0.2",
79
- "typescript-eslint": "8.58.0",
80
- "vite-tsconfig-paths": "6.1.1",
81
- "vitest": "4.1.2"
78
+ "typescript-eslint": "8.58.1",
79
+ "vite": "8.0.8",
80
+ "vitest": "4.1.4"
82
81
  },
83
82
  "peerDependencies": {
84
83
  "@eslint/js": ">=9.0.0",
85
84
  "eslint": ">=9.0.0",
86
85
  "eslint-config-prettier": ">=10.0.0",
87
- "eslint-import-resolver-typescript": ">=4.0.0",
88
- "eslint-plugin-import": ">=2.0.0",
86
+ "eslint-import-resolver-typescript": "4.4.4",
87
+ "eslint-plugin-import-x": ">=4.16.2",
89
88
  "eslint-plugin-jsdoc": ">=61.5.0",
90
89
  "eslint-plugin-jsx-a11y": ">=6.0.0",
90
+ "eslint-plugin-markdownlint": "0.9.0",
91
91
  "eslint-plugin-n": ">=17.23.1",
92
92
  "eslint-plugin-package-json": ">=0.85.0",
93
93
  "eslint-plugin-perfectionist": ">=5.0.0",
@@ -95,28 +95,24 @@
95
95
  "eslint-plugin-react": ">=7.0.0",
96
96
  "eslint-plugin-react-hooks": ">=7.0.0",
97
97
  "eslint-plugin-react-refresh": ">=0.4.0",
98
- "typedoc": ">=0.28.15",
99
- "typedoc-plugin-markdown": ">=4.9.0",
100
- "typedoc-rhineai-theme": ">=1.2.0",
101
- "typescript-eslint": ">=8.0.0",
102
- "vite-tsconfig-paths": ">=5.1.4",
103
- "vitest": ">=4.0.13"
98
+ "typescript-eslint": ">=8.0.0"
104
99
  },
105
100
  "scripts": {
106
101
  "build": "tsdown",
107
- "create-feature-docs": "typedoc",
108
102
  "create-local-package": "pnpm run build && rm -f alextheman-eslint-plugin-*.tgz && pnpm pack",
109
103
  "create-release-note": "bash -c 'git pull origin main && alex-c-line template release-note create $@' --",
110
- "format": "pnpm run format-prettier && pnpm run format-eslint",
104
+ "format": "pnpm run format-prettier && pnpm run format-eslint && pnpm run format-markdownlint",
111
105
  "format-and-build": "tsx src/utility/checkConfigChanges.ts || pnpm run build && pnpm run format",
112
106
  "format-eslint": "eslint --fix --suppress-all \"{src,tests}/**/*.ts\" \"package.json\" && rm -f eslint-suppressions.json",
107
+ "format-markdownlint": "markdownlint-cli2 --fix \"**/*.md\" \"!{node_modules,dist}/**\" | grep -v \"^Finding:\"",
113
108
  "format-prettier": "pnpm run format-prettier-typescript && pnpm run format-prettier-javascript && pnpm run format-prettier-yml",
114
109
  "format-prettier-javascript": "prettier --write \"./**/*.js\"",
115
110
  "format-prettier-typescript": "prettier --write --parser typescript \"./**/*.ts\"",
116
111
  "format-prettier-yml": "prettier --write \"./**/*.yml\"",
117
- "lint": "pnpm run lint-tsc && pnpm run lint-eslint && pnpm run lint-prettier && pnpm run lint-pre-release",
112
+ "lint": "pnpm run lint-tsc && pnpm run lint-eslint && pnpm run lint-markdownlint && pnpm run lint-prettier && pnpm run lint-pre-release",
118
113
  "lint-and-build": "tsx src/utility/checkConfigChanges.ts || pnpm run build && pnpm run lint",
119
114
  "lint-eslint": "eslint \"{src,tests}/**/*.ts\" \"package.json\"",
115
+ "lint-markdownlint": "bash -o pipefail -c 'pnpm exec markdownlint-cli2 \"**/*.md\" \"!{node_modules,dist}/**\" | grep -v \"^Finding:\"'",
120
116
  "lint-pre-release": "alex-c-line package-json check --rules no-pre-release-dependencies",
121
117
  "lint-prettier": "pnpm run lint-prettier-typescript && pnpm run lint-prettier-javascript && pnpm run lint-prettier-yml",
122
118
  "lint-prettier-javascript": "prettier --check \"./**/*.js\"",