@alextheman/eslint-plugin 4.8.6 → 4.9.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/README.md CHANGED
@@ -16,109 +16,19 @@ Since most of the time, you will be using this plugin only to check your code as
16
16
  npm install --save-peer @alextheman/eslint-plugin
17
17
  ```
18
18
 
19
- ## Creating a new rule
20
-
21
- To add a new rule, you must first create the skeleton structure of your rule, following the given template:
22
-
23
- ```typescript
24
- const myRule = createRule({
25
- name: "my-rule",
26
- meta: {
27
- docs: {
28
- description: "Description of the rule",
29
- },
30
- messages: {
31
- message: "Message to be displayed on violation",
32
- },
33
- type: "suggestion",
34
- schema: [],
35
- },
36
- defaultOptions: [],
37
- create(context) {
38
-
39
- },
40
- });
41
-
42
- export default myRule;
43
- ```
44
-
45
- The schema may take an array of objects defining what options can be configured. At the very least, these take in a type, but if you specify the type as object, you must also provide the properties. For example:
46
-
47
- ```typescript
48
- schema: [
49
- {
50
- type: "object",
51
- properties: {
52
- preference: {
53
- type: "string",
54
- },
55
- },
56
- additionalProperties: false,
57
- }
58
- ]
59
- ```
60
-
61
- Add the rule to `src/rules/index.ts`:
62
-
63
- ```typescript
64
- import consistentTestFunction from "src/rules/consistent-test-function";
65
- import noIsolatedTests from "src/rules/no-isolated-tests";
66
- import noNamespaceImports from "src/rules/no-namespace-imports";
67
- // ...
68
- import myRule from "src/rules/my-rule"
69
-
70
- export default {
71
- "consistent-test-function": consistentTestFunction,
72
- "no-isolated-tests": noIsolatedTests,
73
- "no-namespace-imports": noNamespaceImports,
74
- // ...
75
- "my-rule": myRule
76
- };
77
- ```
78
-
79
-
80
- Next, create the test suite for the rule. You have two choices for which test runner to use - you may either use the `standardRuleTester` or `ruleTesterWithParser`.
81
-
82
- Use the `ruleTesterWithParser` if you are writing a rule that requires context about the current directory structure. You will then have to specify a filename property for every valid and invalid entry, and it must be a path that exists relative to `tests/fixtures`. Note that we are currently looking into the possibility of using something like tempy to generate a temporary directory per test to run the tests in, but this is not quite ready at the moment so this is the best for now. Feel free to create a pull request if you've come up with something, though.
83
-
84
- For all other rules, `standardRuleTester` is the best to use.
85
-
86
- In both cases, you must first pass the rule name, then the actual rule property, then an object containing all valid and invalid cases:
87
-
88
- ```typescript
89
- standardRuleTester.run("my-rule", rules["my-rule"], {
90
- valid: [
91
- {
92
- code: "Valid code here"
93
- }
94
- ],
95
- invalid: [
96
- {
97
- code: "Invalid code here",
98
- errors: {
99
- messageId: "message",
100
- data: {
101
- source: "source"
102
- }
103
- }
104
- }
105
- ]
106
- })
107
- ```
108
-
109
- Finally, you may create your rule by adding code to the `create(context)` method. Creating an ESLint rule is one of things that is very involved and goes beyond the scope of this README, but you can check out [the ESLint docs](https://eslint.org/docs/latest/extend/custom-rule-tutorial) for more information.
110
-
111
19
  ## Configs
112
20
  ### The Config Groups
113
21
 
114
- The configs of this plugin are structured in a very particular way. We have our general configs in `src/configs/general`, our plugin configs in `src/configs/plugin`, and our combined configs in `src/configs/combined`. In all three cases, we use the [ESLint flat config style](https://eslint.org/blog/2022/08/new-config-system-part-2/) as that's the most up-to-date config style and allows for more flexibility than just using a package.json or .eslintrc.
22
+ The configs of this plugin are structured in a very particular way. We have our general configs in `src/configs/general`, our plugin configs in `src/configs/plugin`, our personal internal configs in `src/configs/personal`, and our combined configs in `src/configs/combined`. In all three cases, we use the [ESLint flat config style](https://eslint.org/blog/2022/08/new-config-system-part-2/) as that's the most up-to-date config style and allows for more flexibility than just using a package.json or .eslintrc.
115
23
 
116
24
 
117
- The general configs are to be used for defining a ruleset that does NOT rely on the custom plugin rules. They must ONLY use external rules. These rules have already been broken down into `javaScriptBase`, `reactBase`, `testsBase`, and `typeScriptBase` (and also `prettierRules` because Prettier can sneak into this ESLint plugin because why not?). Try and keep the configs as separate and scoped to their main point of focus as possible. The only one that extends another is `typeScriptBase` extending `javaScriptBase` as of now. That one is fine, but otherwise, try not to extend another custom config from another unless there is good reason to. This allows the user more freedom to truly customise the rules to their usage.
25
+ The general configs are to be used for defining a ruleset that does NOT rely on the custom plugin rules. They must ONLY use external rules.
118
26
 
119
27
  The plugin configs are to be used for defining a ruleset that ONLY relies on the custom plugin rules. They must NOT use any external rules. This ensures that, for any users who just want a few recommended configs for only the plugin's rules, they can choose from the ones provided without also having to deal with a bunch of other external rules polluting it as well.
120
28
 
121
- Lastly, the combined configs may use combinations of both external rules and custom rules. They will most frequently extend configs from both the general rules and plugin rules, but we may also add/disable rules specifically in these combined rules, in case there may be some overlap that none of the other configs account for. This is the most flexible group of the three, but is also the most likely one to break on new updates. As such, I would recommend against using configs from this group in production code and go with one of the other more stable ones (unless you're me and actually control the plugin entirely).
29
+ The personal configs are to be used for defining a ruleset to primarily be used in my own projects. They are likely to change according to the needs of my own projects without taking public usage into account and is therefore not recommended to be used outside of my own projects.
30
+
31
+ Lastly, the combined configs may use combinations of both external rules and custom rules. They will most frequently extend configs from any group. It is the most likely one to break on new updates, so I would recommend against using configs from this group in production code and go with one of the other more stable ones (unless you're me and actually control the plugin entirely).
122
32
 
123
33
  ### Usage
124
34
 
@@ -144,84 +54,3 @@ export default [
144
54
  }
145
55
  ]
146
56
  ```
147
-
148
- ### Adding a config
149
-
150
- Starting with the general config because that's the easiest - you can create a config file in `src/configs/general` and define a config in the same way you would define any regular ESLint flat config. Again, please make sure you do NOT include any plugin-specific rules.
151
-
152
- Once you have done this, export it from `src/configs/general/index.ts`, then in `src/alexPlugin.ts`, go to where `alexPlugin.configs`is defined and add the config to the object defined under the `general` property.
153
-
154
- ```typescript
155
- alexPlugin.configs = createPluginConfigs({
156
- general: {
157
- javaScript: javaScriptBase,
158
- typeScript: typeScriptBase,
159
- react: reactBase,
160
- tests: testsBase,
161
- },
162
- // ...
163
- });
164
- ```
165
-
166
- The `createPluginConfigs` helper will map this to a more standard ESLint naming convention. That is, something like `{ general: { myRuleset } }` will be accessible on the plugin from `plugin.configs["general/my-ruleset"]`.
167
-
168
- For plugin/combined configs, this is where it gets trickier. These rulesets tend to rely on the usage of the plugin itself, but we also need to define the plugin to be able to use it in configs. As such, the workaround for this is to provide a function that takes in the plugin and returns the config. For example:
169
-
170
- ```typescript
171
- import type { Linter } from "eslint";
172
- import type { AlexPlugin } from "src/index";
173
-
174
- function createPluginBaseConfig(plugin: AlexPlugin): Linter.Config[] {
175
- return [
176
- {
177
- plugins: {
178
- "@alextheman": plugin,
179
- },
180
- rules: {
181
- "@alextheman/no-namespace-imports": "error",
182
- "@alextheman/no-relative-imports": "error",
183
- "@alextheman/use-normalized-imports": "error",
184
- "@alextheman/use-object-shorthand": "error",
185
- },
186
- },
187
- ];
188
- }
189
-
190
- export default createPluginBaseConfig;
191
- ```
192
-
193
- This then gets exported from the relevant folder's `index.ts` file again, and then where we define our configs in `src/alexPlugin.ts`, we invoke the function passing in the plugin.
194
-
195
- ```typescript
196
- alexPlugin.configs = createPluginConfigs({
197
- // ...
198
- plugin: {
199
- base: createPluginBaseConfig(alexPlugin),
200
- tests: createPluginTestsBaseConfig(alexPlugin),
201
- },
202
- combined: {
203
- javaScript: createCombinedJavaScriptBaseConfig(alexPlugin),
204
- typeScript: createCombinedTypeScriptBaseConfig(alexPlugin),
205
- react: createCombinedReactBaseConfig(alexPlugin),
206
- tests: createCombinedTestsBaseConfig(alexPlugin),
207
- typeScriptReact: createCombinedTypeScriptReactBaseConfig(alexPlugin),
208
- javaScriptReact: createCombinedJavaScriptReactBaseConfig(alexPlugin),
209
- },
210
- });
211
- ```
212
-
213
- Note that this also means that, in config files that provide them using this functional approach, we should NEVER import the plugin directly. This would most likely create circular imports where the plugin ends up calling itself while trying to define itself. Instead, always use the given plugin argument if you want to access the plugin. In the combined configs, if you want to refer to an existing plugin ruleset, it's best to import the function for that ruleset, then call it and pass in the plugin, like so:
214
-
215
- ```typescript
216
- import type { Linter } from "eslint";
217
- import type { AlexPlugin } from "src/index";
218
-
219
- import { typeScriptBase } from "src/configs/general";
220
- import { createPluginBaseConfig } from "src/configs/plugin";
221
-
222
- function createCombinedTypeScriptBaseConfig(plugin: AlexPlugin): Linter.Config[] {
223
- return [...createPluginBaseConfig(plugin), ...typeScriptBase];
224
- }
225
-
226
- export default createCombinedTypeScriptBaseConfig;
227
- ```
package/dist/index.cjs CHANGED
@@ -27,12 +27,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  }) : target, mod));
28
28
 
29
29
  //#endregion
30
- let __alextheman_utility = require("@alextheman/utility");
31
- let __typescript_eslint_utils = require("@typescript-eslint/utils");
30
+ let _alextheman_utility = require("@alextheman/utility");
31
+ let _typescript_eslint_utils = require("@typescript-eslint/utils");
32
32
  let zod = require("zod");
33
33
  zod = __toESM(zod);
34
- let __eslint_js = require("@eslint/js");
35
- __eslint_js = __toESM(__eslint_js);
34
+ let _eslint_js = require("@eslint/js");
35
+ _eslint_js = __toESM(_eslint_js);
36
36
  let eslint_config_prettier = require("eslint-config-prettier");
37
37
  eslint_config_prettier = __toESM(eslint_config_prettier);
38
38
  let eslint_plugin_import = require("eslint-plugin-import");
@@ -59,11 +59,6 @@ eslint_plugin_package_json = __toESM(eslint_plugin_package_json);
59
59
  let eslint_plugin_jsdoc = require("eslint-plugin-jsdoc");
60
60
  eslint_plugin_jsdoc = __toESM(eslint_plugin_jsdoc);
61
61
 
62
- //#region package.json
63
- var name = "@alextheman/eslint-plugin";
64
- var version = "4.8.6";
65
-
66
- //#endregion
67
62
  //#region node_modules/.pnpm/globals@16.5.0/node_modules/globals/globals.json
68
63
  var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
69
64
  module.exports = {
@@ -3419,7 +3414,7 @@ var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3419
3414
 
3420
3415
  //#endregion
3421
3416
  //#region src/configs/helpers/restrictedImports/generalRestrictedImports.ts
3422
- var import_globals$2 = /* @__PURE__ */ __toESM(require_globals(), 1);
3417
+ var import_globals = /* @__PURE__ */ __toESM(require_globals(), 1);
3423
3418
  const generalRestrictedImports = { patterns: [{
3424
3419
  group: ["node_modules"],
3425
3420
  message: "Do not import directly from node_modules."
@@ -3438,7 +3433,7 @@ var generalRestrictedImports_default = generalRestrictedImports;
3438
3433
  * @returns A value of `true` if the given `objectName` and `propertyName` matches those of the node, and `false` otherwise.
3439
3434
  */
3440
3435
  function checkCallExpression(node, objectName, propertyName) {
3441
- 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;
3436
+ 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;
3442
3437
  }
3443
3438
  var checkCallExpression_default = checkCallExpression;
3444
3439
 
@@ -3462,8 +3457,8 @@ function combineRestrictedImports(...groups) {
3462
3457
  paths,
3463
3458
  patterns
3464
3459
  };
3465
- if (combinedGroup.paths.length === 0) return (0, __alextheman_utility.omitProperties)(combinedGroup, "paths");
3466
- if (combinedGroup.patterns.length === 0) return (0, __alextheman_utility.omitProperties)(combinedGroup, "patterns");
3460
+ if (combinedGroup.paths.length === 0) return (0, _alextheman_utility.omitProperties)(combinedGroup, "paths");
3461
+ if (combinedGroup.patterns.length === 0) return (0, _alextheman_utility.omitProperties)(combinedGroup, "patterns");
3467
3462
  return combinedGroup;
3468
3463
  }
3469
3464
  var combineRestrictedImports_default = combineRestrictedImports;
@@ -3478,7 +3473,7 @@ var combineRestrictedImports_default = combineRestrictedImports;
3478
3473
  * @returns An array containing the resulting JSON Schema, formatted for ESLint rule schema compatibility.
3479
3474
  */
3480
3475
  function createRuleSchemaFromZodSchema(schema$1) {
3481
- return [(0, __alextheman_utility.omitProperties)(zod.default.toJSONSchema(schema$1), "$schema")];
3476
+ return [(0, _alextheman_utility.omitProperties)(zod.default.toJSONSchema(schema$1), "$schema")];
3482
3477
  }
3483
3478
  var createRuleSchemaFromZodSchema_default = createRuleSchemaFromZodSchema;
3484
3479
 
@@ -3519,9 +3514,9 @@ var testsRestrictedImports_default = testsRestrictedImports;
3519
3514
  const personalTests = [{
3520
3515
  files: ["**/*.test.{js,ts}"],
3521
3516
  languageOptions: { globals: {
3522
- ...import_globals$2.default.node,
3523
- ...import_globals$2.default.browser,
3524
- ...import_globals$2.default.vitest
3517
+ ...import_globals.default.node,
3518
+ ...import_globals.default.browser,
3519
+ ...import_globals.default.vitest
3525
3520
  } },
3526
3521
  name: "@alextheman/personal/tests",
3527
3522
  rules: {
@@ -3543,7 +3538,7 @@ const personalTests = [{
3543
3538
  "no-restricted-imports": ["error", testsRestrictedImports_default]
3544
3539
  }
3545
3540
  }];
3546
- var tests_default$1 = personalTests;
3541
+ var tests_default$2 = personalTests;
3547
3542
 
3548
3543
  //#endregion
3549
3544
  //#region src/configs/plugin/base.ts
@@ -3574,26 +3569,25 @@ function pluginTests(plugin) {
3574
3569
  }
3575
3570
  }];
3576
3571
  }
3577
- var tests_default$2 = pluginTests;
3572
+ var tests_default$1 = pluginTests;
3578
3573
 
3579
3574
  //#endregion
3580
3575
  //#region src/configs/combined/tests.ts
3581
3576
  function combinedTests(plugin) {
3582
3577
  return [
3583
3578
  { name: "@alextheman/combined/tests" },
3584
- ...tests_default$2(plugin),
3585
- ...tests_default$1
3579
+ ...tests_default$1(plugin),
3580
+ ...tests_default$2
3586
3581
  ];
3587
3582
  }
3588
3583
  var tests_default = combinedTests;
3589
3584
 
3590
3585
  //#endregion
3591
3586
  //#region src/configs/helpers/javaScriptLanguageOptions.ts
3592
- var import_globals$1 = /* @__PURE__ */ __toESM(require_globals(), 1);
3593
3587
  const javaScriptLanguageOptions = { globals: {
3594
- ...import_globals$1.default.node,
3595
- ...import_globals$1.default.browser,
3596
- ...import_globals$1.default.vitest
3588
+ ...import_globals.default.node,
3589
+ ...import_globals.default.browser,
3590
+ ...import_globals.default.vitest
3597
3591
  } };
3598
3592
  var javaScriptLanguageOptions_default = javaScriptLanguageOptions;
3599
3593
 
@@ -3609,7 +3603,7 @@ var unusedVarsIgnorePatterns_default = unusedVarsIgnorePatterns;
3609
3603
  //#endregion
3610
3604
  //#region src/configs/general/javaScript.ts
3611
3605
  const generalJavaScript = [
3612
- __eslint_js.default.configs.recommended,
3606
+ _eslint_js.default.configs.recommended,
3613
3607
  eslint_config_prettier.default,
3614
3608
  {
3615
3609
  files: [
@@ -3654,7 +3648,6 @@ var prettierRules_default = prettierRules;
3654
3648
 
3655
3649
  //#endregion
3656
3650
  //#region src/configs/helpers/reactLanguageOptions.ts
3657
- var import_globals = /* @__PURE__ */ __toESM(require_globals(), 1);
3658
3651
  const reactLanguageOptions = {
3659
3652
  ecmaVersion: 2020,
3660
3653
  globals: import_globals.default.browser,
@@ -3662,12 +3655,44 @@ const reactLanguageOptions = {
3662
3655
  };
3663
3656
  var reactLanguageOptions_default = reactLanguageOptions;
3664
3657
 
3658
+ //#endregion
3659
+ //#region src/configs/helpers/typeScriptLanguageOptions.ts
3660
+ const typeScriptLanguageOptions = {
3661
+ parser: typescript_eslint.default.parser,
3662
+ parserOptions: {
3663
+ ecmaVersion: "latest",
3664
+ projectService: true,
3665
+ sourceType: "module",
3666
+ tsconfigRootDir: process.cwd()
3667
+ }
3668
+ };
3669
+ var typeScriptLanguageOptions_default = typeScriptLanguageOptions;
3670
+
3671
+ //#endregion
3672
+ //#region src/configs/helpers/vitestConfig.ts
3673
+ function vitestConfig(environment = "jsdom") {
3674
+ return (0, vitest_config.defineConfig)({
3675
+ plugins: [(0, vite_tsconfig_paths.default)()],
3676
+ test: {
3677
+ environment,
3678
+ globals: true,
3679
+ include: ["**/tests/**/*.test.ts"]
3680
+ }
3681
+ });
3682
+ }
3683
+ var vitestConfig_default = vitestConfig;
3684
+
3665
3685
  //#endregion
3666
3686
  //#region src/configs/helpers/sorting/sortExports.ts
3667
3687
  const sortExports = {
3668
3688
  customGroups: [],
3669
3689
  fallbackSort: { type: "natural" },
3670
- groups: ["value-export", "type-export"],
3690
+ groups: [
3691
+ "value-export",
3692
+ "wildcard-value-export",
3693
+ "type-export",
3694
+ "wildcard-type-export"
3695
+ ],
3671
3696
  ignoreCase: true,
3672
3697
  newlinesBetween: 1,
3673
3698
  order: "asc",
@@ -3681,12 +3706,31 @@ var sortExports_default = sortExports;
3681
3706
  //#endregion
3682
3707
  //#region src/configs/helpers/sorting/sortImports.ts
3683
3708
  const sortImports = {
3709
+ customGroups: [
3710
+ {
3711
+ elementNamePattern: ["package.json"],
3712
+ groupName: "package-json"
3713
+ },
3714
+ {
3715
+ elementNamePattern: ["^tests/.*"],
3716
+ groupName: "type-tests",
3717
+ selector: "type"
3718
+ },
3719
+ {
3720
+ elementNamePattern: ["^tests/.*"],
3721
+ groupName: "value-tests"
3722
+ }
3723
+ ],
3684
3724
  groups: [
3685
- "type",
3686
- "builtin",
3687
- "external",
3688
- "internal",
3689
- "object"
3725
+ "type-builtin",
3726
+ "type-external",
3727
+ "type-tests",
3728
+ "type-internal",
3729
+ "value-external",
3730
+ "value-builtin",
3731
+ "value-tests",
3732
+ "value-internal",
3733
+ "package-json"
3690
3734
  ],
3691
3735
  ignoreCase: true,
3692
3736
  internalPattern: ["^src/.*"],
@@ -3703,13 +3747,10 @@ var sortImports_default = sortImports;
3703
3747
  //#region src/configs/helpers/sorting/sortObjects.ts
3704
3748
  const sortObjects = {
3705
3749
  customGroups: [],
3706
- destructuredObjects: true,
3707
3750
  fallbackSort: { type: "unsorted" },
3708
3751
  groups: [],
3709
3752
  ignoreCase: true,
3710
- ignorePattern: [],
3711
3753
  newlinesBetween: "ignore",
3712
- objectDeclarations: true,
3713
3754
  order: "asc",
3714
3755
  partitionByComment: false,
3715
3756
  partitionByNewLine: false,
@@ -3720,33 +3761,6 @@ const sortObjects = {
3720
3761
  };
3721
3762
  var sortObjects_default = sortObjects;
3722
3763
 
3723
- //#endregion
3724
- //#region src/configs/helpers/typeScriptLanguageOptions.ts
3725
- const typeScriptLanguageOptions = {
3726
- parser: typescript_eslint.default.parser,
3727
- parserOptions: {
3728
- ecmaVersion: "latest",
3729
- projectService: true,
3730
- sourceType: "module",
3731
- tsconfigRootDir: process.cwd()
3732
- }
3733
- };
3734
- var typeScriptLanguageOptions_default = typeScriptLanguageOptions;
3735
-
3736
- //#endregion
3737
- //#region src/configs/helpers/vitestConfig.ts
3738
- function vitestConfig(environment = "jsdom") {
3739
- return (0, vitest_config.defineConfig)({
3740
- plugins: [(0, vite_tsconfig_paths.default)()],
3741
- test: {
3742
- environment,
3743
- globals: true,
3744
- include: ["**/tests/**/*.test.ts"]
3745
- }
3746
- });
3747
- }
3748
- var vitestConfig_default = vitestConfig;
3749
-
3750
3764
  //#endregion
3751
3765
  //#region src/configs/personal/javaScriptBase.ts
3752
3766
  function personalJavaScript(plugin) {
@@ -3809,7 +3823,7 @@ var javaScript_default = combinedJavaScript;
3809
3823
  const reactHooks = {
3810
3824
  ...eslint_plugin_react_hooks.default,
3811
3825
  configs: {
3812
- ...(0, __alextheman_utility.omitProperties)(eslint_plugin_react_hooks.default.configs, "flat"),
3826
+ ...(0, _alextheman_utility.omitProperties)(eslint_plugin_react_hooks.default.configs, "flat"),
3813
3827
  "flat/recommended": eslint_plugin_react_hooks.default.configs.flat.recommended,
3814
3828
  "flat/recommended-latest": eslint_plugin_react_hooks.default.configs.flat["recommended-latest"]
3815
3829
  }
@@ -3850,7 +3864,7 @@ const generalReact = [
3850
3864
  settings: { react: { version: "detect" } }
3851
3865
  }
3852
3866
  ];
3853
- var react_default$1 = generalReact;
3867
+ var react_default$2 = generalReact;
3854
3868
 
3855
3869
  //#endregion
3856
3870
  //#region src/configs/helpers/restrictedImports/reactRestrictedImports.ts
@@ -3878,14 +3892,14 @@ const personalReact = [{
3878
3892
  "react/jsx-boolean-value": "error"
3879
3893
  }
3880
3894
  }];
3881
- var react_default$2 = personalReact;
3895
+ var react_default$1 = personalReact;
3882
3896
 
3883
3897
  //#endregion
3884
3898
  //#region src/configs/combined/react.ts
3885
3899
  const combinedReact = [
3886
3900
  { name: "@alextheman/combined/react" },
3887
- ...react_default$1,
3888
- ...react_default$2
3901
+ ...react_default$2,
3902
+ ...react_default$1
3889
3903
  ];
3890
3904
  var react_default = combinedReact;
3891
3905
 
@@ -3931,7 +3945,7 @@ const generalTypeScript = [
3931
3945
  }
3932
3946
  }
3933
3947
  ];
3934
- var typeScript_default$1 = generalTypeScript;
3948
+ var typeScript_default$2 = generalTypeScript;
3935
3949
 
3936
3950
  //#endregion
3937
3951
  //#region src/configs/personal/alexCLine.ts
@@ -4132,7 +4146,7 @@ function personalTypeScript(plugin) {
4132
4146
  }
4133
4147
  }];
4134
4148
  }
4135
- var typeScript_default$2 = personalTypeScript;
4149
+ var typeScript_default$1 = personalTypeScript;
4136
4150
 
4137
4151
  //#endregion
4138
4152
  //#region src/configs/personal/utility.ts
@@ -4155,8 +4169,8 @@ function combinedTypeScript(plugin) {
4155
4169
  return [
4156
4170
  { name: "@alextheman/combined/typescript" },
4157
4171
  ...javaScript_default(plugin),
4158
- ...typeScript_default$1,
4159
- ...typeScript_default$2(plugin)
4172
+ ...typeScript_default$2,
4173
+ ...typeScript_default$1(plugin)
4160
4174
  ];
4161
4175
  }
4162
4176
  var typeScript_default = combinedTypeScript;
@@ -4186,7 +4200,7 @@ var typeScriptReact_default = combinedTypeScriptReact;
4186
4200
  //#endregion
4187
4201
  //#region src/utility/private/camelToKebab.ts
4188
4202
  function camelToKebab(string) {
4189
- return (0, __alextheman_utility.camelToKebab)(string.replace(/[Tt]ypeScript/, "typescript").replace(/[Jj]avaScript/, "javascript"));
4203
+ return (0, _alextheman_utility.camelToKebab)(string.replace(/[Tt]ypeScript/, "typescript").replace(/[Jj]avaScript/, "javascript"));
4190
4204
  }
4191
4205
  var camelToKebab_default = camelToKebab;
4192
4206
 
@@ -4224,8 +4238,8 @@ function createAlexPluginConfigs(plugin) {
4224
4238
  general: {
4225
4239
  javaScript: javaScript_default$1,
4226
4240
  packageJson: packageJson_default,
4227
- react: react_default$1,
4228
- typeScript: typeScript_default$1
4241
+ react: react_default$2,
4242
+ typeScript: typeScript_default$2
4229
4243
  },
4230
4244
  personal: {
4231
4245
  alexCLine: alexCLine_default,
@@ -4234,15 +4248,15 @@ function createAlexPluginConfigs(plugin) {
4234
4248
  javaScript: javaScriptBase_default(plugin),
4235
4249
  neurosongsBackEnd: neurosongsBackEnd_default,
4236
4250
  neurosongsFrontEnd: neurosongsFrontEnd_default,
4237
- react: react_default$2,
4238
- tests: tests_default$1,
4239
- typeScript: typeScript_default$2(plugin),
4251
+ react: react_default$1,
4252
+ tests: tests_default$2,
4253
+ typeScript: typeScript_default$1(plugin),
4240
4254
  typeScriptPackage: typeScriptPackage_default$1,
4241
4255
  utility: utility_default
4242
4256
  },
4243
4257
  plugin: {
4244
4258
  base: base_default(plugin),
4245
- tests: tests_default$2(plugin)
4259
+ tests: tests_default$1(plugin)
4246
4260
  }
4247
4261
  });
4248
4262
  }
@@ -4250,7 +4264,7 @@ var configs_default = createAlexPluginConfigs;
4250
4264
 
4251
4265
  //#endregion
4252
4266
  //#region src/rules/helpers/createRule.ts
4253
- const createRule = __typescript_eslint_utils.ESLintUtils.RuleCreator((ruleName) => {
4267
+ const createRule = _typescript_eslint_utils.ESLintUtils.RuleCreator((ruleName) => {
4254
4268
  return ruleName;
4255
4269
  });
4256
4270
  var createRule_default = createRule;
@@ -4295,7 +4309,7 @@ const consistentTestFunction = createRule_default({
4295
4309
  const { preference = "test", fixable = true } = parseConsistentTestFunctionOptions(context.options[0] ?? {});
4296
4310
  return {
4297
4311
  CallExpression(node) {
4298
- if (node.callee.type === __typescript_eslint_utils.AST_NODE_TYPES.Identifier && node.callee.name === "it" && preference === "test") return context.report({
4312
+ if (node.callee.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier && node.callee.name === "it" && preference === "test") return context.report({
4299
4313
  node,
4300
4314
  messageId: "message",
4301
4315
  data: {
@@ -4306,7 +4320,7 @@ const consistentTestFunction = createRule_default({
4306
4320
  return fixer.replaceText(node.callee, "test");
4307
4321
  })
4308
4322
  });
4309
- if (node.callee.type === __typescript_eslint_utils.AST_NODE_TYPES.Identifier && node.callee.name === "test" && preference === "it") return context.report({
4323
+ if (node.callee.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier && node.callee.name === "test" && preference === "it") return context.report({
4310
4324
  node,
4311
4325
  messageId: "message",
4312
4326
  data: {
@@ -4320,7 +4334,7 @@ const consistentTestFunction = createRule_default({
4320
4334
  },
4321
4335
  ImportDeclaration(node) {
4322
4336
  for (const specifier of node.specifiers) {
4323
- if (specifier.type === __typescript_eslint_utils.AST_NODE_TYPES.ImportSpecifier && specifier.imported.type === __typescript_eslint_utils.AST_NODE_TYPES.Identifier && specifier.imported.name === "it" && preference === "test") return context.report({
4337
+ if (specifier.type === _typescript_eslint_utils.AST_NODE_TYPES.ImportSpecifier && specifier.imported.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier && specifier.imported.name === "it" && preference === "test") return context.report({
4324
4338
  node,
4325
4339
  messageId: "message",
4326
4340
  data: {
@@ -4329,7 +4343,7 @@ const consistentTestFunction = createRule_default({
4329
4343
  },
4330
4344
  fix: fixOnCondition_default(fixable, (fixer) => {
4331
4345
  const importedNames = node.specifiers.map((specifier$1) => {
4332
- 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 : "";
4346
+ 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 : "";
4333
4347
  });
4334
4348
  if (importedNames.includes("it") && importedNames.includes("test")) {
4335
4349
  const newSpecifiers = getImportSpecifiersAfterRemoving_default(context, node.specifiers, "it");
@@ -4338,7 +4352,7 @@ const consistentTestFunction = createRule_default({
4338
4352
  return fixer.replaceTextRange([specifier.imported.range[0], specifier.imported.range[1]], preference);
4339
4353
  })
4340
4354
  });
4341
- if (specifier.type === __typescript_eslint_utils.AST_NODE_TYPES.ImportSpecifier && specifier.imported.type === __typescript_eslint_utils.AST_NODE_TYPES.Identifier && specifier.imported.name === "test" && preference === "it") return context.report({
4355
+ if (specifier.type === _typescript_eslint_utils.AST_NODE_TYPES.ImportSpecifier && specifier.imported.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier && specifier.imported.name === "test" && preference === "it") return context.report({
4342
4356
  node,
4343
4357
  messageId: "message",
4344
4358
  data: {
@@ -4347,7 +4361,7 @@ const consistentTestFunction = createRule_default({
4347
4361
  },
4348
4362
  fix: fixOnCondition_default(fixable, (fixer) => {
4349
4363
  const importedNames = node.specifiers.map((specifier$1) => {
4350
- 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 : "";
4364
+ 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 : "";
4351
4365
  });
4352
4366
  if (importedNames.includes("it") && importedNames.includes("test")) {
4353
4367
  const newSpecifiers = getImportSpecifiersAfterRemoving_default(context, node.specifiers, "test");
@@ -4544,9 +4558,9 @@ const schema = createRuleSchemaFromZodSchema_default(standardiseErrorMessagesOpt
4544
4558
  const defaultErrorRegex = "^[A-Z]+(?:_[A-Z]+)*$";
4545
4559
  function checkCurrentNode(context, node) {
4546
4560
  const { regex: errorRegex = defaultErrorRegex } = parseStandardiseErrorMessagesOptions(context.options[0] ?? { regex: defaultErrorRegex });
4547
- if (node.callee.type === __typescript_eslint_utils.AST_NODE_TYPES.Identifier && node.callee.name === "Error") {
4561
+ if (node.callee.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier && node.callee.name === "Error") {
4548
4562
  const [errorArgument] = node.arguments;
4549
- const errorMessage = errorArgument.type === __typescript_eslint_utils.AST_NODE_TYPES.Literal ? errorArgument.value : "";
4563
+ const errorMessage = errorArgument.type === _typescript_eslint_utils.AST_NODE_TYPES.Literal ? errorArgument.value : "";
4550
4564
  if (!RegExp(errorRegex).test(typeof errorMessage === "string" ? errorMessage : "")) return context.report({
4551
4565
  node,
4552
4566
  messageId: "message",
@@ -4598,7 +4612,7 @@ const useNormalizedImports = createRule_default({
4598
4612
  create(context) {
4599
4613
  const { fixable = true } = parseUseNormalizedImportsOptions(context.options[0] ?? { fixable: true });
4600
4614
  return { ImportDeclaration(node) {
4601
- const normalizedPath = (0, __alextheman_utility.normalizeImportPath)(node.source.value);
4615
+ const normalizedPath = (0, _alextheman_utility.normalizeImportPath)(node.source.value);
4602
4616
  if (node.source.value !== normalizedPath) return context.report({
4603
4617
  node,
4604
4618
  messageId: "pathNotNormalized",
@@ -4635,7 +4649,7 @@ const useObjectShorthand = createRule_default({
4635
4649
  create(context) {
4636
4650
  const { fixable = true } = parseUseObjectShorthandOptions(context.options[0] ?? { fixable: true });
4637
4651
  return { Property(node) {
4638
- 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({
4652
+ 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({
4639
4653
  node,
4640
4654
  messageId: "useShorthand",
4641
4655
  data: { source: context.sourceCode.getText(node) },
@@ -4663,6 +4677,11 @@ var rules_default = {
4663
4677
  "use-object-shorthand": use_object_shorthand_default
4664
4678
  };
4665
4679
 
4680
+ //#endregion
4681
+ //#region package.json
4682
+ var name = "@alextheman/eslint-plugin";
4683
+ var version = "4.9.1";
4684
+
4666
4685
  //#endregion
4667
4686
  //#region src/alexPlugin.ts
4668
4687
  const alexPlugin = {
@@ -4674,7 +4693,7 @@ const alexPlugin = {
4674
4693
  configs: {},
4675
4694
  rules: rules_default
4676
4695
  };
4677
- alexPlugin.configs = configs_default((0, __alextheman_utility.deepFreeze)((0, __alextheman_utility.deepCopy)(alexPlugin)));
4696
+ alexPlugin.configs = configs_default((0, _alextheman_utility.deepFreeze)((0, _alextheman_utility.deepCopy)(alexPlugin)));
4678
4697
  var alexPlugin_default = alexPlugin;
4679
4698
 
4680
4699
  //#endregion
package/dist/index.d.cts CHANGED
@@ -8,10 +8,6 @@ import z from "zod";
8
8
  import { TSESTree } from "@typescript-eslint/utils";
9
9
  import { JSONSchema4 } from "@typescript-eslint/utils/json-schema";
10
10
 
11
- //#region package.d.ts
12
- declare let name: string;
13
- declare let version: string;
14
- //#endregion
15
11
  //#region src/utility/private/camelToKebab.d.ts
16
12
  type CamelToKebab<S extends string> = S extends `${IgnoreCase<"J">}avaScript${infer Rest}` ? Rest extends "" ? "javascript" : `javascript${CamelToKebab<Rest>}` : S extends `${IgnoreCase<"T">}ypeScript${infer Rest}` ? Rest extends "" ? "typescript" : `typescript${CamelToKebab<Rest>}` : S extends `${infer Head}${infer Tail}` ? Head extends Lowercase<Head> ? `${Head}${CamelToKebab<Tail>}` : `-${Lowercase<Head>}${CamelToKebab<Tail>}` : S;
17
13
  //#endregion
@@ -32,6 +28,10 @@ type ConfigKey = { [Group in ConfigGroupName & string]: `${CamelToKebab<Group>}/
32
28
  //#region src/configs/index.d.ts
33
29
  declare function createAlexPluginConfigs(plugin: Readonly<AlexPlugin>): Record<ConfigKey, Linter.Config[]>;
34
30
  //#endregion
31
+ //#region package.d.ts
32
+ declare let name: string;
33
+ declare let version: string;
34
+ //#endregion
35
35
  //#region src/alexPlugin.d.ts
36
36
  interface AlexPlugin {
37
37
  meta: {
@@ -50,6 +50,19 @@ declare const prettierRules: Config;
50
50
  //#region src/configs/helpers/reactLanguageOptions.d.ts
51
51
  declare const reactLanguageOptions: Linter.LanguageOptions;
52
52
  //#endregion
53
+ //#region src/configs/helpers/typeScriptLanguageOptions.d.ts
54
+ declare const typeScriptLanguageOptions: Linter.LanguageOptions;
55
+ //#endregion
56
+ //#region src/configs/helpers/unusedVarsIgnorePatterns.d.ts
57
+ declare const unusedVarsIgnorePatterns: {
58
+ argsIgnorePattern: string;
59
+ caughtErrorsIgnorePattern: string;
60
+ varsIgnorePattern: string;
61
+ };
62
+ //#endregion
63
+ //#region src/configs/helpers/vitestConfig.d.ts
64
+ declare function vitestConfig(environment?: VitestEnvironment): vite0.UserConfig;
65
+ //#endregion
53
66
  //#region src/configs/helpers/sorting/sortExports.d.ts
54
67
  declare const sortExports: {
55
68
  customGroups: never[];
@@ -68,6 +81,15 @@ declare const sortExports: {
68
81
  //#endregion
69
82
  //#region src/configs/helpers/sorting/sortImports.d.ts
70
83
  declare const sortImports: {
84
+ customGroups: ({
85
+ elementNamePattern: string[];
86
+ groupName: string;
87
+ selector?: undefined;
88
+ } | {
89
+ elementNamePattern: string[];
90
+ groupName: string;
91
+ selector: string;
92
+ })[];
71
93
  groups: string[];
72
94
  ignoreCase: boolean;
73
95
  internalPattern: string[];
@@ -82,15 +104,12 @@ declare const sortImports: {
82
104
  //#region src/configs/helpers/sorting/sortObjects.d.ts
83
105
  declare const sortObjects: {
84
106
  customGroups: never[];
85
- destructuredObjects: boolean;
86
107
  fallbackSort: {
87
108
  type: string;
88
109
  };
89
110
  groups: never[];
90
111
  ignoreCase: boolean;
91
- ignorePattern: never[];
92
112
  newlinesBetween: string;
93
- objectDeclarations: boolean;
94
113
  order: string;
95
114
  partitionByComment: boolean;
96
115
  partitionByNewLine: boolean;
@@ -100,19 +119,6 @@ declare const sortObjects: {
100
119
  useConfigurationIf: {};
101
120
  };
102
121
  //#endregion
103
- //#region src/configs/helpers/typeScriptLanguageOptions.d.ts
104
- declare const typeScriptLanguageOptions: Linter.LanguageOptions;
105
- //#endregion
106
- //#region src/configs/helpers/unusedVarsIgnorePatterns.d.ts
107
- declare const unusedVarsIgnorePatterns: {
108
- argsIgnorePattern: string;
109
- caughtErrorsIgnorePattern: string;
110
- varsIgnorePattern: string;
111
- };
112
- //#endregion
113
- //#region src/configs/helpers/vitestConfig.d.ts
114
- declare function vitestConfig(environment?: VitestEnvironment): vite0.UserConfig;
115
- //#endregion
116
122
  //#region src/configs/helpers/restrictedImports/NoRestrictedImportsOptions.d.ts
117
123
  interface RestrictedPathImportBase {
118
124
  message: string;
package/dist/index.d.ts CHANGED
@@ -8,10 +8,6 @@ import { VitestEnvironment } from "vitest/node";
8
8
  import { RuleContext, RuleFix, RuleFixer } from "@typescript-eslint/utils/ts-eslint";
9
9
  import { JSONSchema4 } from "@typescript-eslint/utils/json-schema";
10
10
 
11
- //#region package.d.ts
12
- declare let name: string;
13
- declare let version: string;
14
- //#endregion
15
11
  //#region src/utility/private/camelToKebab.d.ts
16
12
  type CamelToKebab<S extends string> = S extends `${IgnoreCase<"J">}avaScript${infer Rest}` ? Rest extends "" ? "javascript" : `javascript${CamelToKebab<Rest>}` : S extends `${IgnoreCase<"T">}ypeScript${infer Rest}` ? Rest extends "" ? "typescript" : `typescript${CamelToKebab<Rest>}` : S extends `${infer Head}${infer Tail}` ? Head extends Lowercase<Head> ? `${Head}${CamelToKebab<Tail>}` : `-${Lowercase<Head>}${CamelToKebab<Tail>}` : S;
17
13
  //#endregion
@@ -32,6 +28,10 @@ type ConfigKey = { [Group in ConfigGroupName & string]: `${CamelToKebab<Group>}/
32
28
  //#region src/configs/index.d.ts
33
29
  declare function createAlexPluginConfigs(plugin: Readonly<AlexPlugin>): Record<ConfigKey, Linter.Config[]>;
34
30
  //#endregion
31
+ //#region package.d.ts
32
+ declare let name: string;
33
+ declare let version: string;
34
+ //#endregion
35
35
  //#region src/alexPlugin.d.ts
36
36
  interface AlexPlugin {
37
37
  meta: {
@@ -50,6 +50,19 @@ declare const prettierRules: Config;
50
50
  //#region src/configs/helpers/reactLanguageOptions.d.ts
51
51
  declare const reactLanguageOptions: Linter.LanguageOptions;
52
52
  //#endregion
53
+ //#region src/configs/helpers/typeScriptLanguageOptions.d.ts
54
+ declare const typeScriptLanguageOptions: Linter.LanguageOptions;
55
+ //#endregion
56
+ //#region src/configs/helpers/unusedVarsIgnorePatterns.d.ts
57
+ declare const unusedVarsIgnorePatterns: {
58
+ argsIgnorePattern: string;
59
+ caughtErrorsIgnorePattern: string;
60
+ varsIgnorePattern: string;
61
+ };
62
+ //#endregion
63
+ //#region src/configs/helpers/vitestConfig.d.ts
64
+ declare function vitestConfig(environment?: VitestEnvironment): vite0.UserConfig;
65
+ //#endregion
53
66
  //#region src/configs/helpers/sorting/sortExports.d.ts
54
67
  declare const sortExports: {
55
68
  customGroups: never[];
@@ -68,6 +81,15 @@ declare const sortExports: {
68
81
  //#endregion
69
82
  //#region src/configs/helpers/sorting/sortImports.d.ts
70
83
  declare const sortImports: {
84
+ customGroups: ({
85
+ elementNamePattern: string[];
86
+ groupName: string;
87
+ selector?: undefined;
88
+ } | {
89
+ elementNamePattern: string[];
90
+ groupName: string;
91
+ selector: string;
92
+ })[];
71
93
  groups: string[];
72
94
  ignoreCase: boolean;
73
95
  internalPattern: string[];
@@ -82,15 +104,12 @@ declare const sortImports: {
82
104
  //#region src/configs/helpers/sorting/sortObjects.d.ts
83
105
  declare const sortObjects: {
84
106
  customGroups: never[];
85
- destructuredObjects: boolean;
86
107
  fallbackSort: {
87
108
  type: string;
88
109
  };
89
110
  groups: never[];
90
111
  ignoreCase: boolean;
91
- ignorePattern: never[];
92
112
  newlinesBetween: string;
93
- objectDeclarations: boolean;
94
113
  order: string;
95
114
  partitionByComment: boolean;
96
115
  partitionByNewLine: boolean;
@@ -100,19 +119,6 @@ declare const sortObjects: {
100
119
  useConfigurationIf: {};
101
120
  };
102
121
  //#endregion
103
- //#region src/configs/helpers/typeScriptLanguageOptions.d.ts
104
- declare const typeScriptLanguageOptions: Linter.LanguageOptions;
105
- //#endregion
106
- //#region src/configs/helpers/unusedVarsIgnorePatterns.d.ts
107
- declare const unusedVarsIgnorePatterns: {
108
- argsIgnorePattern: string;
109
- caughtErrorsIgnorePattern: string;
110
- varsIgnorePattern: string;
111
- };
112
- //#endregion
113
- //#region src/configs/helpers/vitestConfig.d.ts
114
- declare function vitestConfig(environment?: VitestEnvironment): vite0.UserConfig;
115
- //#endregion
116
122
  //#region src/configs/helpers/restrictedImports/NoRestrictedImportsOptions.d.ts
117
123
  interface RestrictedPathImportBase {
118
124
  message: string;
package/dist/index.js CHANGED
@@ -43,11 +43,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
43
43
  enumerable: true
44
44
  }) : target, mod));
45
45
 
46
- //#endregion
47
- //#region package.json
48
- var name = "@alextheman/eslint-plugin";
49
- var version = "4.8.6";
50
-
51
46
  //#endregion
52
47
  //#region node_modules/.pnpm/globals@16.5.0/node_modules/globals/globals.json
53
48
  var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -3404,7 +3399,7 @@ var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3404
3399
 
3405
3400
  //#endregion
3406
3401
  //#region src/configs/helpers/restrictedImports/generalRestrictedImports.ts
3407
- var import_globals$2 = /* @__PURE__ */ __toESM(require_globals(), 1);
3402
+ var import_globals = /* @__PURE__ */ __toESM(require_globals(), 1);
3408
3403
  const generalRestrictedImports = { patterns: [{
3409
3404
  group: ["node_modules"],
3410
3405
  message: "Do not import directly from node_modules."
@@ -3504,9 +3499,9 @@ var testsRestrictedImports_default = testsRestrictedImports;
3504
3499
  const personalTests = [{
3505
3500
  files: ["**/*.test.{js,ts}"],
3506
3501
  languageOptions: { globals: {
3507
- ...import_globals$2.default.node,
3508
- ...import_globals$2.default.browser,
3509
- ...import_globals$2.default.vitest
3502
+ ...import_globals.default.node,
3503
+ ...import_globals.default.browser,
3504
+ ...import_globals.default.vitest
3510
3505
  } },
3511
3506
  name: "@alextheman/personal/tests",
3512
3507
  rules: {
@@ -3528,7 +3523,7 @@ const personalTests = [{
3528
3523
  "no-restricted-imports": ["error", testsRestrictedImports_default]
3529
3524
  }
3530
3525
  }];
3531
- var tests_default$1 = personalTests;
3526
+ var tests_default$2 = personalTests;
3532
3527
 
3533
3528
  //#endregion
3534
3529
  //#region src/configs/plugin/base.ts
@@ -3559,26 +3554,25 @@ function pluginTests(plugin) {
3559
3554
  }
3560
3555
  }];
3561
3556
  }
3562
- var tests_default$2 = pluginTests;
3557
+ var tests_default$1 = pluginTests;
3563
3558
 
3564
3559
  //#endregion
3565
3560
  //#region src/configs/combined/tests.ts
3566
3561
  function combinedTests(plugin) {
3567
3562
  return [
3568
3563
  { name: "@alextheman/combined/tests" },
3569
- ...tests_default$2(plugin),
3570
- ...tests_default$1
3564
+ ...tests_default$1(plugin),
3565
+ ...tests_default$2
3571
3566
  ];
3572
3567
  }
3573
3568
  var tests_default = combinedTests;
3574
3569
 
3575
3570
  //#endregion
3576
3571
  //#region src/configs/helpers/javaScriptLanguageOptions.ts
3577
- var import_globals$1 = /* @__PURE__ */ __toESM(require_globals(), 1);
3578
3572
  const javaScriptLanguageOptions = { globals: {
3579
- ...import_globals$1.default.node,
3580
- ...import_globals$1.default.browser,
3581
- ...import_globals$1.default.vitest
3573
+ ...import_globals.default.node,
3574
+ ...import_globals.default.browser,
3575
+ ...import_globals.default.vitest
3582
3576
  } };
3583
3577
  var javaScriptLanguageOptions_default = javaScriptLanguageOptions;
3584
3578
 
@@ -3639,7 +3633,6 @@ var prettierRules_default = prettierRules;
3639
3633
 
3640
3634
  //#endregion
3641
3635
  //#region src/configs/helpers/reactLanguageOptions.ts
3642
- var import_globals = /* @__PURE__ */ __toESM(require_globals(), 1);
3643
3636
  const reactLanguageOptions = {
3644
3637
  ecmaVersion: 2020,
3645
3638
  globals: import_globals.default.browser,
@@ -3647,12 +3640,44 @@ const reactLanguageOptions = {
3647
3640
  };
3648
3641
  var reactLanguageOptions_default = reactLanguageOptions;
3649
3642
 
3643
+ //#endregion
3644
+ //#region src/configs/helpers/typeScriptLanguageOptions.ts
3645
+ const typeScriptLanguageOptions = {
3646
+ parser: tseslint.parser,
3647
+ parserOptions: {
3648
+ ecmaVersion: "latest",
3649
+ projectService: true,
3650
+ sourceType: "module",
3651
+ tsconfigRootDir: process.cwd()
3652
+ }
3653
+ };
3654
+ var typeScriptLanguageOptions_default = typeScriptLanguageOptions;
3655
+
3656
+ //#endregion
3657
+ //#region src/configs/helpers/vitestConfig.ts
3658
+ function vitestConfig(environment = "jsdom") {
3659
+ return defineConfig({
3660
+ plugins: [tsconfigPaths()],
3661
+ test: {
3662
+ environment,
3663
+ globals: true,
3664
+ include: ["**/tests/**/*.test.ts"]
3665
+ }
3666
+ });
3667
+ }
3668
+ var vitestConfig_default = vitestConfig;
3669
+
3650
3670
  //#endregion
3651
3671
  //#region src/configs/helpers/sorting/sortExports.ts
3652
3672
  const sortExports = {
3653
3673
  customGroups: [],
3654
3674
  fallbackSort: { type: "natural" },
3655
- groups: ["value-export", "type-export"],
3675
+ groups: [
3676
+ "value-export",
3677
+ "wildcard-value-export",
3678
+ "type-export",
3679
+ "wildcard-type-export"
3680
+ ],
3656
3681
  ignoreCase: true,
3657
3682
  newlinesBetween: 1,
3658
3683
  order: "asc",
@@ -3666,12 +3691,31 @@ var sortExports_default = sortExports;
3666
3691
  //#endregion
3667
3692
  //#region src/configs/helpers/sorting/sortImports.ts
3668
3693
  const sortImports = {
3694
+ customGroups: [
3695
+ {
3696
+ elementNamePattern: ["package.json"],
3697
+ groupName: "package-json"
3698
+ },
3699
+ {
3700
+ elementNamePattern: ["^tests/.*"],
3701
+ groupName: "type-tests",
3702
+ selector: "type"
3703
+ },
3704
+ {
3705
+ elementNamePattern: ["^tests/.*"],
3706
+ groupName: "value-tests"
3707
+ }
3708
+ ],
3669
3709
  groups: [
3670
- "type",
3671
- "builtin",
3672
- "external",
3673
- "internal",
3674
- "object"
3710
+ "type-builtin",
3711
+ "type-external",
3712
+ "type-tests",
3713
+ "type-internal",
3714
+ "value-external",
3715
+ "value-builtin",
3716
+ "value-tests",
3717
+ "value-internal",
3718
+ "package-json"
3675
3719
  ],
3676
3720
  ignoreCase: true,
3677
3721
  internalPattern: ["^src/.*"],
@@ -3688,13 +3732,10 @@ var sortImports_default = sortImports;
3688
3732
  //#region src/configs/helpers/sorting/sortObjects.ts
3689
3733
  const sortObjects = {
3690
3734
  customGroups: [],
3691
- destructuredObjects: true,
3692
3735
  fallbackSort: { type: "unsorted" },
3693
3736
  groups: [],
3694
3737
  ignoreCase: true,
3695
- ignorePattern: [],
3696
3738
  newlinesBetween: "ignore",
3697
- objectDeclarations: true,
3698
3739
  order: "asc",
3699
3740
  partitionByComment: false,
3700
3741
  partitionByNewLine: false,
@@ -3705,33 +3746,6 @@ const sortObjects = {
3705
3746
  };
3706
3747
  var sortObjects_default = sortObjects;
3707
3748
 
3708
- //#endregion
3709
- //#region src/configs/helpers/typeScriptLanguageOptions.ts
3710
- const typeScriptLanguageOptions = {
3711
- parser: tseslint.parser,
3712
- parserOptions: {
3713
- ecmaVersion: "latest",
3714
- projectService: true,
3715
- sourceType: "module",
3716
- tsconfigRootDir: process.cwd()
3717
- }
3718
- };
3719
- var typeScriptLanguageOptions_default = typeScriptLanguageOptions;
3720
-
3721
- //#endregion
3722
- //#region src/configs/helpers/vitestConfig.ts
3723
- function vitestConfig(environment = "jsdom") {
3724
- return defineConfig({
3725
- plugins: [tsconfigPaths()],
3726
- test: {
3727
- environment,
3728
- globals: true,
3729
- include: ["**/tests/**/*.test.ts"]
3730
- }
3731
- });
3732
- }
3733
- var vitestConfig_default = vitestConfig;
3734
-
3735
3749
  //#endregion
3736
3750
  //#region src/configs/personal/javaScriptBase.ts
3737
3751
  function personalJavaScript(plugin) {
@@ -3835,7 +3849,7 @@ const generalReact = [
3835
3849
  settings: { react: { version: "detect" } }
3836
3850
  }
3837
3851
  ];
3838
- var react_default$1 = generalReact;
3852
+ var react_default$2 = generalReact;
3839
3853
 
3840
3854
  //#endregion
3841
3855
  //#region src/configs/helpers/restrictedImports/reactRestrictedImports.ts
@@ -3863,14 +3877,14 @@ const personalReact = [{
3863
3877
  "react/jsx-boolean-value": "error"
3864
3878
  }
3865
3879
  }];
3866
- var react_default$2 = personalReact;
3880
+ var react_default$1 = personalReact;
3867
3881
 
3868
3882
  //#endregion
3869
3883
  //#region src/configs/combined/react.ts
3870
3884
  const combinedReact = [
3871
3885
  { name: "@alextheman/combined/react" },
3872
- ...react_default$1,
3873
- ...react_default$2
3886
+ ...react_default$2,
3887
+ ...react_default$1
3874
3888
  ];
3875
3889
  var react_default = combinedReact;
3876
3890
 
@@ -3916,7 +3930,7 @@ const generalTypeScript = [
3916
3930
  }
3917
3931
  }
3918
3932
  ];
3919
- var typeScript_default$1 = generalTypeScript;
3933
+ var typeScript_default$2 = generalTypeScript;
3920
3934
 
3921
3935
  //#endregion
3922
3936
  //#region src/configs/personal/alexCLine.ts
@@ -4117,7 +4131,7 @@ function personalTypeScript(plugin) {
4117
4131
  }
4118
4132
  }];
4119
4133
  }
4120
- var typeScript_default$2 = personalTypeScript;
4134
+ var typeScript_default$1 = personalTypeScript;
4121
4135
 
4122
4136
  //#endregion
4123
4137
  //#region src/configs/personal/utility.ts
@@ -4140,8 +4154,8 @@ function combinedTypeScript(plugin) {
4140
4154
  return [
4141
4155
  { name: "@alextheman/combined/typescript" },
4142
4156
  ...javaScript_default(plugin),
4143
- ...typeScript_default$1,
4144
- ...typeScript_default$2(plugin)
4157
+ ...typeScript_default$2,
4158
+ ...typeScript_default$1(plugin)
4145
4159
  ];
4146
4160
  }
4147
4161
  var typeScript_default = combinedTypeScript;
@@ -4209,8 +4223,8 @@ function createAlexPluginConfigs(plugin) {
4209
4223
  general: {
4210
4224
  javaScript: javaScript_default$1,
4211
4225
  packageJson: packageJson_default,
4212
- react: react_default$1,
4213
- typeScript: typeScript_default$1
4226
+ react: react_default$2,
4227
+ typeScript: typeScript_default$2
4214
4228
  },
4215
4229
  personal: {
4216
4230
  alexCLine: alexCLine_default,
@@ -4219,15 +4233,15 @@ function createAlexPluginConfigs(plugin) {
4219
4233
  javaScript: javaScriptBase_default(plugin),
4220
4234
  neurosongsBackEnd: neurosongsBackEnd_default,
4221
4235
  neurosongsFrontEnd: neurosongsFrontEnd_default,
4222
- react: react_default$2,
4223
- tests: tests_default$1,
4224
- typeScript: typeScript_default$2(plugin),
4236
+ react: react_default$1,
4237
+ tests: tests_default$2,
4238
+ typeScript: typeScript_default$1(plugin),
4225
4239
  typeScriptPackage: typeScriptPackage_default$1,
4226
4240
  utility: utility_default
4227
4241
  },
4228
4242
  plugin: {
4229
4243
  base: base_default(plugin),
4230
- tests: tests_default$2(plugin)
4244
+ tests: tests_default$1(plugin)
4231
4245
  }
4232
4246
  });
4233
4247
  }
@@ -4648,6 +4662,11 @@ var rules_default = {
4648
4662
  "use-object-shorthand": use_object_shorthand_default
4649
4663
  };
4650
4664
 
4665
+ //#endregion
4666
+ //#region package.json
4667
+ var name = "@alextheman/eslint-plugin";
4668
+ var version = "4.9.1";
4669
+
4651
4670
  //#endregion
4652
4671
  //#region src/alexPlugin.ts
4653
4672
  const alexPlugin = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/eslint-plugin",
3
- "version": "4.8.6",
3
+ "version": "4.9.1",
4
4
  "description": "A package to provide custom ESLint rules and configs",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,42 +15,44 @@
15
15
  "dist"
16
16
  ],
17
17
  "dependencies": {
18
- "@alextheman/utility": "^3.5.5",
19
- "@typescript-eslint/utils": "^8.49.0",
18
+ "@alextheman/utility": "^3.10.1",
19
+ "@typescript-eslint/utils": "^8.50.0",
20
20
  "common-tags": "^1.8.2",
21
- "zod": "^4.1.13"
21
+ "zod": "^4.2.1"
22
22
  },
23
23
  "devDependencies": {
24
- "@eslint/js": "^9.39.1",
24
+ "@eslint/js": "^9.39.2",
25
25
  "@types/common-tags": "^1.8.4",
26
26
  "@types/eslint": "^9.6.1",
27
27
  "@types/eslint-plugin-jsx-a11y": "^6.10.1",
28
- "@types/node": "^25.0.1",
29
- "@typescript-eslint/rule-tester": "^8.49.0",
28
+ "@types/node": "^25.0.3",
29
+ "@typescript-eslint/rule-tester": "^8.50.0",
30
+ "@typescript-eslint/types": "^8.50.0",
31
+ "alex-c-line": "^1.9.0",
30
32
  "dotenv-cli": "^11.0.0",
31
- "eslint": "^9.39.1",
33
+ "eslint": "^9.39.2",
32
34
  "eslint-config-prettier": "^10.1.8",
33
35
  "eslint-import-resolver-typescript": "^4.4.4",
34
36
  "eslint-plugin-import": "^2.32.0",
35
37
  "eslint-plugin-jsdoc": "^61.5.0",
36
38
  "eslint-plugin-jsx-a11y": "^6.10.2",
37
39
  "eslint-plugin-package-json": "^0.85.0",
38
- "eslint-plugin-perfectionist": "^4.15.1",
40
+ "eslint-plugin-perfectionist": "^5.0.0",
39
41
  "eslint-plugin-prettier": "^5.5.4",
40
42
  "eslint-plugin-react": "^7.37.5",
41
43
  "eslint-plugin-react-hooks": "^7.0.1",
42
- "eslint-plugin-react-refresh": "^0.4.24",
43
- "eslint-vitest-rule-tester": "^3.0.0",
44
+ "eslint-plugin-react-refresh": "^0.4.26",
45
+ "eslint-vitest-rule-tester": "^3.0.1",
44
46
  "globals": "^16.5.0",
45
47
  "husky": "^9.1.7",
46
48
  "jsdom": "^27.3.0",
47
49
  "prettier": "^3.7.4",
48
- "tsdown": "^0.17.3",
50
+ "tsdown": "^0.18.1",
49
51
  "tsx": "^4.21.0",
50
52
  "typescript": "^5.9.3",
51
- "typescript-eslint": "^8.49.0",
52
- "vite-tsconfig-paths": "^5.1.4",
53
- "vitest": "^4.0.15"
53
+ "typescript-eslint": "^8.50.0",
54
+ "vite-tsconfig-paths": "^6.0.3",
55
+ "vitest": "^4.0.16"
54
56
  },
55
57
  "peerDependencies": {
56
58
  "@eslint/js": ">=9.0.0",
@@ -72,10 +74,10 @@
72
74
  },
73
75
  "scripts": {
74
76
  "build": "tsdown",
75
- "change-major": "pnpm version major -m \"Change version number to v%s\"",
76
- "change-minor": "pnpm version minor -m \"Change version number to v%s\"",
77
- "change-patch": "pnpm version patch -m \"Change version number to v%s\"",
78
77
  "create-local-package": "pnpm run build && rm -f alextheman-eslint-plugin-*.tgz && pnpm pack",
78
+ "create-release-note-major": "git pull origin main && alex-c-line create-release-note major",
79
+ "create-release-note-minor": "git pull origin main && alex-c-line create-release-note minor",
80
+ "create-release-note-patch": "git pull origin main && alex-c-line create-release-note patch",
79
81
  "format": "pnpm run format-prettier && pnpm run format-eslint",
80
82
  "format-and-build": "tsx src/utility/checkConfigChanges.ts || pnpm run build && pnpm run format",
81
83
  "format-eslint": "eslint --fix --suppress-all \"src/**/*.ts\" \"tests/**/*.ts\" \"package.json\" && rm -f eslint-suppressions.json",