@alextheman/eslint-plugin 2.6.0 → 2.6.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
@@ -3761,7 +3761,7 @@ var import_eslint_plugin_package_json = __toESM(require("eslint-plugin-package-j
3761
3761
 
3762
3762
  // package.json
3763
3763
  var name = "@alextheman/eslint-plugin";
3764
- var version = "2.6.0";
3764
+ var version = "2.6.1";
3765
3765
 
3766
3766
  // src/configs/personal/testsBase.ts
3767
3767
  var import_globals = __toESM(require_globals2(), 1);
@@ -4950,7 +4950,7 @@ alexPlugin.configs = createPluginConfigs_default({
4950
4950
  tests: testsBase_default,
4951
4951
  eslintPlugin: eslintPlugin_default(alexPlugin),
4952
4952
  neurosongsBackEnd: neurosongsBackEnd_default,
4953
- neursongsFrontEnd: neurosongsFrontEnd_default
4953
+ neurosongsFrontEnd: neurosongsFrontEnd_default
4954
4954
  },
4955
4955
  combined: {
4956
4956
  javaScript: [
package/dist/index.d.cts CHANGED
@@ -1,39 +1,27 @@
1
1
  import { Linter } from 'eslint';
2
+ import { IgnoreCase } from '@alextheman/utility';
2
3
  import z from 'zod';
3
4
  import { Config } from 'prettier';
4
5
 
5
6
  var name = "@alextheman/eslint-plugin";
6
- var version = "2.6.0";
7
+ var version = "2.6.1";
7
8
 
9
+ type ToKebabCase<S extends string> = S extends `${IgnoreCase<"J">}avaScript${infer Rest}` ? Rest extends "" ? "javascript" : `javascript${ToKebabCase<Rest>}` : S extends `${IgnoreCase<"T">}ypeScript${infer Rest}` ? Rest extends "" ? "typescript" : `typescript${ToKebabCase<Rest>}` : S extends `${infer Head}${infer Tail}` ? Head extends Lowercase<Head> ? `${Head}${ToKebabCase<Tail>}` : `-${Lowercase<Head>}${ToKebabCase<Tail>}` : S;
10
+
11
+ type GeneralConfigs = "javaScript" | "typeScript" | "react";
12
+ type PluginConfigs = "base" | "tests";
13
+ type PersonalConfigs = "javaScript" | "typeScript" | "react" | "tests" | "eslintPlugin" | "neurosongsBackEnd" | "neurosongsFrontEnd";
14
+ type CombinedConfigs = "javaScript" | "typeScript" | "react" | "tests" | "typeScriptReact" | "javaScriptReact";
8
15
  interface AlexPluginConfigs {
9
- general: {
10
- javaScript: Linter.Config[];
11
- typeScript: Linter.Config[];
12
- react: Linter.Config[];
13
- };
14
- plugin: {
15
- base: Linter.Config[];
16
- tests: Linter.Config[];
17
- };
18
- personal: {
19
- javaScript: Linter.Config[];
20
- typeScript: Linter.Config[];
21
- react: Linter.Config[];
22
- tests: Linter.Config[];
23
- eslintPlugin: Linter.Config[];
24
- neurosongsBackEnd: Linter.Config[];
25
- neursongsFrontEnd: Linter.Config[];
26
- };
27
- combined: {
28
- javaScript: Linter.Config[];
29
- typeScript: Linter.Config[];
30
- react: Linter.Config[];
31
- tests: Linter.Config[];
32
- typeScriptReact: Linter.Config[];
33
- javaScriptReact: Linter.Config[];
34
- };
16
+ general: Record<GeneralConfigs, Linter.Config[]>;
17
+ plugin: Record<PluginConfigs, Linter.Config[]>;
18
+ personal: Record<PersonalConfigs, Linter.Config[]>;
19
+ combined: Record<CombinedConfigs, Linter.Config[]>;
35
20
  }
36
- declare function createPluginConfigs(config: AlexPluginConfigs): Record<`${string}/${string}`, Linter.Config[]>;
21
+ type ConfigKey = {
22
+ [G in keyof AlexPluginConfigs & string]: `${ToKebabCase<G>}/${ToKebabCase<keyof AlexPluginConfigs[G] & string>}`;
23
+ }[keyof AlexPluginConfigs & string];
24
+ declare function createPluginConfigs(config: AlexPluginConfigs): Record<ConfigKey, Linter.Config[]>;
37
25
 
38
26
  interface AlexPlugin {
39
27
  meta: {
package/dist/index.d.ts CHANGED
@@ -1,39 +1,27 @@
1
1
  import { Linter } from 'eslint';
2
+ import { IgnoreCase } from '@alextheman/utility';
2
3
  import z from 'zod';
3
4
  import { Config } from 'prettier';
4
5
 
5
6
  var name = "@alextheman/eslint-plugin";
6
- var version = "2.6.0";
7
+ var version = "2.6.1";
7
8
 
9
+ type ToKebabCase<S extends string> = S extends `${IgnoreCase<"J">}avaScript${infer Rest}` ? Rest extends "" ? "javascript" : `javascript${ToKebabCase<Rest>}` : S extends `${IgnoreCase<"T">}ypeScript${infer Rest}` ? Rest extends "" ? "typescript" : `typescript${ToKebabCase<Rest>}` : S extends `${infer Head}${infer Tail}` ? Head extends Lowercase<Head> ? `${Head}${ToKebabCase<Tail>}` : `-${Lowercase<Head>}${ToKebabCase<Tail>}` : S;
10
+
11
+ type GeneralConfigs = "javaScript" | "typeScript" | "react";
12
+ type PluginConfigs = "base" | "tests";
13
+ type PersonalConfigs = "javaScript" | "typeScript" | "react" | "tests" | "eslintPlugin" | "neurosongsBackEnd" | "neurosongsFrontEnd";
14
+ type CombinedConfigs = "javaScript" | "typeScript" | "react" | "tests" | "typeScriptReact" | "javaScriptReact";
8
15
  interface AlexPluginConfigs {
9
- general: {
10
- javaScript: Linter.Config[];
11
- typeScript: Linter.Config[];
12
- react: Linter.Config[];
13
- };
14
- plugin: {
15
- base: Linter.Config[];
16
- tests: Linter.Config[];
17
- };
18
- personal: {
19
- javaScript: Linter.Config[];
20
- typeScript: Linter.Config[];
21
- react: Linter.Config[];
22
- tests: Linter.Config[];
23
- eslintPlugin: Linter.Config[];
24
- neurosongsBackEnd: Linter.Config[];
25
- neursongsFrontEnd: Linter.Config[];
26
- };
27
- combined: {
28
- javaScript: Linter.Config[];
29
- typeScript: Linter.Config[];
30
- react: Linter.Config[];
31
- tests: Linter.Config[];
32
- typeScriptReact: Linter.Config[];
33
- javaScriptReact: Linter.Config[];
34
- };
16
+ general: Record<GeneralConfigs, Linter.Config[]>;
17
+ plugin: Record<PluginConfigs, Linter.Config[]>;
18
+ personal: Record<PersonalConfigs, Linter.Config[]>;
19
+ combined: Record<CombinedConfigs, Linter.Config[]>;
35
20
  }
36
- declare function createPluginConfigs(config: AlexPluginConfigs): Record<`${string}/${string}`, Linter.Config[]>;
21
+ type ConfigKey = {
22
+ [G in keyof AlexPluginConfigs & string]: `${ToKebabCase<G>}/${ToKebabCase<keyof AlexPluginConfigs[G] & string>}`;
23
+ }[keyof AlexPluginConfigs & string];
24
+ declare function createPluginConfigs(config: AlexPluginConfigs): Record<ConfigKey, Linter.Config[]>;
37
25
 
38
26
  interface AlexPlugin {
39
27
  meta: {
package/dist/index.js CHANGED
@@ -3746,7 +3746,7 @@ import packageJson from "eslint-plugin-package-json";
3746
3746
 
3747
3747
  // package.json
3748
3748
  var name = "@alextheman/eslint-plugin";
3749
- var version = "2.6.0";
3749
+ var version = "2.6.1";
3750
3750
 
3751
3751
  // src/configs/personal/testsBase.ts
3752
3752
  var import_globals = __toESM(require_globals2(), 1);
@@ -4935,7 +4935,7 @@ alexPlugin.configs = createPluginConfigs_default({
4935
4935
  tests: testsBase_default,
4936
4936
  eslintPlugin: eslintPlugin_default(alexPlugin),
4937
4937
  neurosongsBackEnd: neurosongsBackEnd_default,
4938
- neursongsFrontEnd: neurosongsFrontEnd_default
4938
+ neurosongsFrontEnd: neurosongsFrontEnd_default
4939
4939
  },
4940
4940
  combined: {
4941
4941
  javaScript: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/eslint-plugin",
3
- "version": "2.6.0",
3
+ "version": "2.6.1",
4
4
  "description": "A package to provide custom ESLint rules and configs",
5
5
  "license": "ISC",
6
6
  "author": "alextheman",
@@ -33,7 +33,7 @@
33
33
  "update-dependencies": "bash -c 'npx npm-check-updates -u \"$@\" && npm install' --"
34
34
  },
35
35
  "dependencies": {
36
- "@alextheman/utility": "^2.12.1",
36
+ "@alextheman/utility": "^2.14.0",
37
37
  "common-tags": "^1.8.2",
38
38
  "eslint-plugin-package-json": "^0.64.0",
39
39
  "zod": "^4.1.12"