@alextheman/eslint-plugin 2.7.0 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -3758,7 +3758,7 @@ module.exports = __toCommonJS(index_exports);
3758
3758
 
3759
3759
  // package.json
3760
3760
  var name = "@alextheman/eslint-plugin";
3761
- var version = "2.7.0";
3761
+ var version = "2.7.1";
3762
3762
 
3763
3763
  // src/configs/index.ts
3764
3764
  var import_eslint_plugin_package_json = __toESM(require("eslint-plugin-package-json"), 1);
@@ -4353,11 +4353,8 @@ var createConfigGroup_default = createConfigGroup;
4353
4353
  // src/utility/createPluginConfigs.ts
4354
4354
  function createPluginConfigs(config) {
4355
4355
  const allConfigs = {};
4356
- for (const group in config) {
4357
- Object.assign(
4358
- allConfigs,
4359
- createConfigGroup_default(group, config[group])
4360
- );
4356
+ for (const configGroupEntries of Object.entries(config)) {
4357
+ Object.assign(allConfigs, createConfigGroup_default(...configGroupEntries));
4361
4358
  }
4362
4359
  return allConfigs;
4363
4360
  }
@@ -4980,7 +4977,7 @@ var rules_default = {
4980
4977
  "use-object-shorthand": use_object_shorthand_default
4981
4978
  };
4982
4979
 
4983
- // src/alexPlugin/index.ts
4980
+ // src/alexPlugin.ts
4984
4981
  var alexPlugin = {
4985
4982
  meta: {
4986
4983
  name,
package/dist/index.d.cts CHANGED
@@ -4,7 +4,7 @@ import { Config } from 'prettier';
4
4
  import z from 'zod';
5
5
 
6
6
  var name = "@alextheman/eslint-plugin";
7
- var version = "2.7.0";
7
+ var version = "2.7.1";
8
8
 
9
9
  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;
10
10
 
@@ -18,9 +18,10 @@ interface AlexPluginConfigGroup {
18
18
  personal: Record<PersonalConfig, Linter.Config[]>;
19
19
  combined: Record<CombinedConfig, Linter.Config[]>;
20
20
  }
21
+ type ConfigGroupName = keyof AlexPluginConfigGroup;
21
22
  type ConfigKey = {
22
- [G in keyof AlexPluginConfigGroup & string]: `${CamelToKebab<G>}/${CamelToKebab<keyof AlexPluginConfigGroup[G] & string>}`;
23
- }[keyof AlexPluginConfigGroup & string];
23
+ [Group in ConfigGroupName & string]: `${CamelToKebab<Group>}/${CamelToKebab<keyof AlexPluginConfigGroup[Group] & string>}`;
24
+ }[ConfigGroupName & string];
24
25
 
25
26
  declare function createAlexPluginConfigs(plugin: AlexPlugin): Record<ConfigKey, Linter.Config[]>;
26
27
 
@@ -44,4 +45,4 @@ declare const validTestFunctionsSchema: z.ZodEnum<{
44
45
  type TestFunction = z.infer<typeof validTestFunctionsSchema>;
45
46
  declare function parseTestFunction(data: unknown): TestFunction;
46
47
 
47
- export { type AlexPlugin, type AlexPluginConfigGroup, type CombinedConfig, type ConfigKey, type GeneralConfig, type PersonalConfig, type PluginConfig, type TestFunction, alexPlugin as default, parseTestFunction, prettierRules };
48
+ export { type AlexPlugin, type AlexPluginConfigGroup, type CombinedConfig, type ConfigGroupName, type ConfigKey, type GeneralConfig, type PersonalConfig, type PluginConfig, type TestFunction, alexPlugin as default, parseTestFunction, prettierRules };
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ import { Config } from 'prettier';
4
4
  import z from 'zod';
5
5
 
6
6
  var name = "@alextheman/eslint-plugin";
7
- var version = "2.7.0";
7
+ var version = "2.7.1";
8
8
 
9
9
  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;
10
10
 
@@ -18,9 +18,10 @@ interface AlexPluginConfigGroup {
18
18
  personal: Record<PersonalConfig, Linter.Config[]>;
19
19
  combined: Record<CombinedConfig, Linter.Config[]>;
20
20
  }
21
+ type ConfigGroupName = keyof AlexPluginConfigGroup;
21
22
  type ConfigKey = {
22
- [G in keyof AlexPluginConfigGroup & string]: `${CamelToKebab<G>}/${CamelToKebab<keyof AlexPluginConfigGroup[G] & string>}`;
23
- }[keyof AlexPluginConfigGroup & string];
23
+ [Group in ConfigGroupName & string]: `${CamelToKebab<Group>}/${CamelToKebab<keyof AlexPluginConfigGroup[Group] & string>}`;
24
+ }[ConfigGroupName & string];
24
25
 
25
26
  declare function createAlexPluginConfigs(plugin: AlexPlugin): Record<ConfigKey, Linter.Config[]>;
26
27
 
@@ -44,4 +45,4 @@ declare const validTestFunctionsSchema: z.ZodEnum<{
44
45
  type TestFunction = z.infer<typeof validTestFunctionsSchema>;
45
46
  declare function parseTestFunction(data: unknown): TestFunction;
46
47
 
47
- export { type AlexPlugin, type AlexPluginConfigGroup, type CombinedConfig, type ConfigKey, type GeneralConfig, type PersonalConfig, type PluginConfig, type TestFunction, alexPlugin as default, parseTestFunction, prettierRules };
48
+ export { type AlexPlugin, type AlexPluginConfigGroup, type CombinedConfig, type ConfigGroupName, type ConfigKey, type GeneralConfig, type PersonalConfig, type PluginConfig, type TestFunction, alexPlugin as default, parseTestFunction, prettierRules };
package/dist/index.js CHANGED
@@ -3743,7 +3743,7 @@ var require_src = __commonJS({
3743
3743
 
3744
3744
  // package.json
3745
3745
  var name = "@alextheman/eslint-plugin";
3746
- var version = "2.7.0";
3746
+ var version = "2.7.1";
3747
3747
 
3748
3748
  // src/configs/index.ts
3749
3749
  import packageJson from "eslint-plugin-package-json";
@@ -4338,11 +4338,8 @@ var createConfigGroup_default = createConfigGroup;
4338
4338
  // src/utility/createPluginConfigs.ts
4339
4339
  function createPluginConfigs(config) {
4340
4340
  const allConfigs = {};
4341
- for (const group in config) {
4342
- Object.assign(
4343
- allConfigs,
4344
- createConfigGroup_default(group, config[group])
4345
- );
4341
+ for (const configGroupEntries of Object.entries(config)) {
4342
+ Object.assign(allConfigs, createConfigGroup_default(...configGroupEntries));
4346
4343
  }
4347
4344
  return allConfigs;
4348
4345
  }
@@ -4965,7 +4962,7 @@ var rules_default = {
4965
4962
  "use-object-shorthand": use_object_shorthand_default
4966
4963
  };
4967
4964
 
4968
- // src/alexPlugin/index.ts
4965
+ // src/alexPlugin.ts
4969
4966
  var alexPlugin = {
4970
4967
  meta: {
4971
4968
  name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/eslint-plugin",
3
- "version": "2.7.0",
3
+ "version": "2.7.1",
4
4
  "description": "A package to provide custom ESLint rules and configs",
5
5
  "license": "ISC",
6
6
  "author": "alextheman",