@alextheman/eslint-plugin 3.2.1 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -3771,10 +3771,7 @@ module.exports = __toCommonJS(index_exports);
3771
3771
 
3772
3772
  // package.json
3773
3773
  var name = "@alextheman/eslint-plugin";
3774
- var version = "3.2.1";
3775
-
3776
- // src/configs/index.ts
3777
- var import_eslint_plugin_package_json = __toESM(require("eslint-plugin-package-json"), 1);
3774
+ var version = "4.0.0";
3778
3775
 
3779
3776
  // src/configs/personal/testsBase.ts
3780
3777
  var import_globals = __toESM(require_globals2(), 1);
@@ -4411,6 +4408,21 @@ function createCombinedTypeScriptReactBaseConfig(plugin) {
4411
4408
  }
4412
4409
  var typeScriptReactBase_default = createCombinedTypeScriptReactBaseConfig;
4413
4410
 
4411
+ // src/configs/general/packageJson.ts
4412
+ var import_eslint_plugin_package_json = __toESM(require("eslint-plugin-package-json"), 1);
4413
+ var packageJsonConfig = [
4414
+ import_eslint_plugin_package_json.default.configs.recommended,
4415
+ {
4416
+ plugins: {
4417
+ "package-json": import_eslint_plugin_package_json.default
4418
+ },
4419
+ rules: {
4420
+ "package-json/scripts-name-casing": "error"
4421
+ }
4422
+ }
4423
+ ];
4424
+ var packageJson_default = packageJsonConfig;
4425
+
4414
4426
  // src/configs/personal/alexCLine.ts
4415
4427
  var import_eslint_plugin_perfectionist3 = __toESM(require("eslint-plugin-perfectionist"), 1);
4416
4428
  var alexCLineConfig = [
@@ -4460,21 +4472,16 @@ var createPluginConfigs_default = createPluginConfigs;
4460
4472
  function createAlexPluginConfigs(plugin) {
4461
4473
  return createPluginConfigs_default({
4462
4474
  combined: {
4463
- javaScript: [...javaScriptBase_default3(plugin), import_eslint_plugin_package_json.default.configs.recommended],
4464
- javaScriptReact: [
4465
- ...javaScriptReactBase_default(plugin),
4466
- import_eslint_plugin_package_json.default.configs.recommended
4467
- ],
4468
- react: [...reactBase_default3, import_eslint_plugin_package_json.default.configs.recommended],
4469
- tests: [...testsBase_default3(plugin), import_eslint_plugin_package_json.default.configs.recommended],
4470
- typeScript: [...typeScriptBase_default3(plugin), import_eslint_plugin_package_json.default.configs.recommended],
4471
- typeScriptReact: [
4472
- ...typeScriptReactBase_default(plugin),
4473
- import_eslint_plugin_package_json.default.configs.recommended
4474
- ]
4475
+ javaScript: [...javaScriptBase_default3(plugin), ...packageJson_default],
4476
+ javaScriptReact: [...javaScriptReactBase_default(plugin), ...packageJson_default],
4477
+ react: [...reactBase_default3, ...packageJson_default],
4478
+ tests: [...testsBase_default3(plugin), ...packageJson_default],
4479
+ typeScript: [...typeScriptBase_default3(plugin), ...packageJson_default],
4480
+ typeScriptReact: [...typeScriptReactBase_default(plugin), ...packageJson_default]
4475
4481
  },
4476
4482
  general: {
4477
4483
  javaScript: javaScriptBase_default,
4484
+ packageJson: packageJson_default,
4478
4485
  react: reactBase_default,
4479
4486
  typeScript: typeScriptBase_default
4480
4487
  },
package/dist/index.d.cts CHANGED
@@ -6,11 +6,11 @@ import { RuleFixer, RuleFix, RuleContext } from '@typescript-eslint/utils/ts-esl
6
6
  import { TSESTree } from '@typescript-eslint/utils';
7
7
 
8
8
  var name = "@alextheman/eslint-plugin";
9
- var version = "3.2.1";
9
+ var version = "4.0.0";
10
10
 
11
11
  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;
12
12
 
13
- type GeneralConfig = "javaScript" | "typeScript" | "react";
13
+ type GeneralConfig = "javaScript" | "typeScript" | "react" | "packageJson";
14
14
  type PluginConfig = "base" | "tests";
15
15
  type PersonalConfig = "javaScript" | "typeScript" | "react" | "tests" | "eslintPlugin" | "neurosongsBackEnd" | "neurosongsFrontEnd" | "utility" | "alexCLine";
16
16
  type CombinedConfig = "javaScript" | "typeScript" | "react" | "tests" | "typeScriptReact" | "javaScriptReact";
package/dist/index.d.ts CHANGED
@@ -6,11 +6,11 @@ import { RuleFixer, RuleFix, RuleContext } from '@typescript-eslint/utils/ts-esl
6
6
  import { TSESTree } from '@typescript-eslint/utils';
7
7
 
8
8
  var name = "@alextheman/eslint-plugin";
9
- var version = "3.2.1";
9
+ var version = "4.0.0";
10
10
 
11
11
  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;
12
12
 
13
- type GeneralConfig = "javaScript" | "typeScript" | "react";
13
+ type GeneralConfig = "javaScript" | "typeScript" | "react" | "packageJson";
14
14
  type PluginConfig = "base" | "tests";
15
15
  type PersonalConfig = "javaScript" | "typeScript" | "react" | "tests" | "eslintPlugin" | "neurosongsBackEnd" | "neurosongsFrontEnd" | "utility" | "alexCLine";
16
16
  type CombinedConfig = "javaScript" | "typeScript" | "react" | "tests" | "typeScriptReact" | "javaScriptReact";
package/dist/index.js CHANGED
@@ -3744,10 +3744,7 @@ var require_src = __commonJS({
3744
3744
 
3745
3745
  // package.json
3746
3746
  var name = "@alextheman/eslint-plugin";
3747
- var version = "3.2.1";
3748
-
3749
- // src/configs/index.ts
3750
- import packageJson from "eslint-plugin-package-json";
3747
+ var version = "4.0.0";
3751
3748
 
3752
3749
  // src/configs/personal/testsBase.ts
3753
3750
  var import_globals = __toESM(require_globals2(), 1);
@@ -4384,6 +4381,21 @@ function createCombinedTypeScriptReactBaseConfig(plugin) {
4384
4381
  }
4385
4382
  var typeScriptReactBase_default = createCombinedTypeScriptReactBaseConfig;
4386
4383
 
4384
+ // src/configs/general/packageJson.ts
4385
+ import packageJson from "eslint-plugin-package-json";
4386
+ var packageJsonConfig = [
4387
+ packageJson.configs.recommended,
4388
+ {
4389
+ plugins: {
4390
+ "package-json": packageJson
4391
+ },
4392
+ rules: {
4393
+ "package-json/scripts-name-casing": "error"
4394
+ }
4395
+ }
4396
+ ];
4397
+ var packageJson_default = packageJsonConfig;
4398
+
4387
4399
  // src/configs/personal/alexCLine.ts
4388
4400
  import perfectionist3 from "eslint-plugin-perfectionist";
4389
4401
  var alexCLineConfig = [
@@ -4433,21 +4445,16 @@ var createPluginConfigs_default = createPluginConfigs;
4433
4445
  function createAlexPluginConfigs(plugin) {
4434
4446
  return createPluginConfigs_default({
4435
4447
  combined: {
4436
- javaScript: [...javaScriptBase_default3(plugin), packageJson.configs.recommended],
4437
- javaScriptReact: [
4438
- ...javaScriptReactBase_default(plugin),
4439
- packageJson.configs.recommended
4440
- ],
4441
- react: [...reactBase_default3, packageJson.configs.recommended],
4442
- tests: [...testsBase_default3(plugin), packageJson.configs.recommended],
4443
- typeScript: [...typeScriptBase_default3(plugin), packageJson.configs.recommended],
4444
- typeScriptReact: [
4445
- ...typeScriptReactBase_default(plugin),
4446
- packageJson.configs.recommended
4447
- ]
4448
+ javaScript: [...javaScriptBase_default3(plugin), ...packageJson_default],
4449
+ javaScriptReact: [...javaScriptReactBase_default(plugin), ...packageJson_default],
4450
+ react: [...reactBase_default3, ...packageJson_default],
4451
+ tests: [...testsBase_default3(plugin), ...packageJson_default],
4452
+ typeScript: [...typeScriptBase_default3(plugin), ...packageJson_default],
4453
+ typeScriptReact: [...typeScriptReactBase_default(plugin), ...packageJson_default]
4448
4454
  },
4449
4455
  general: {
4450
4456
  javaScript: javaScriptBase_default,
4457
+ packageJson: packageJson_default,
4451
4458
  react: reactBase_default,
4452
4459
  typeScript: typeScriptBase_default
4453
4460
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/eslint-plugin",
3
- "version": "3.2.1",
3
+ "version": "4.0.0",
4
4
  "description": "A package to provide custom ESLint rules and configs",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,12 +20,14 @@
20
20
  "change-minor": "npm version minor -m \"Change version number to v%s\"",
21
21
  "change-patch": "npm version patch -m \"Change version number to v%s\"",
22
22
  "create-local-package": "npm run build && rm -f alextheman-eslint-plugin-*.tgz && npm pack",
23
- "format": "tsx src/utility/checkConfigChanges.ts || npm run build && npm run format-prettier && npm run format-eslint",
23
+ "format": "npm run format-prettier && npm run format-eslint",
24
+ "format-and-build": "tsx src/utility/checkConfigChanges.ts || npm run build && npm run format",
24
25
  "format-eslint": "eslint --fix --suppress-all \"src/**/*.ts\" \"tests/**/*.ts\" \"package.json\" && rm -f eslint-suppressions.json",
25
26
  "format-prettier": "npm run format-prettier-typescript && npm run format-prettier-javascript",
26
27
  "format-prettier-javascript": "prettier --write \"./**/*.js\"",
27
28
  "format-prettier-typescript": "prettier --write --parser typescript \"./**/*.ts\"",
28
- "lint": "tsx src/utility/checkConfigChanges.ts || npm run build && npm run lint-tsc && npm run lint-eslint && npm run lint-prettier",
29
+ "lint": "npm run lint-tsc && npm run lint-eslint && npm run lint-prettier",
30
+ "lint-and-build": "tsx src/utility/checkConfigChanges.ts || npm run build && npm run lint",
29
31
  "lint-eslint": "eslint \"src/**/*.ts\" \"tests/**/*.ts\" \"package.json\"",
30
32
  "lint-prettier": "npm run lint-prettier-typescript && npm run lint-prettier-javascript",
31
33
  "lint-prettier-javascript": "prettier --check \"./**/*.js\"",
@@ -38,8 +40,8 @@
38
40
  "update-peer-dependencies": "bash -c 'npx npm-check-updates --dep peer -u \"$@\" && npm install' --"
39
41
  },
40
42
  "dependencies": {
41
- "@alextheman/utility": "^2.15.1",
42
- "@typescript-eslint/utils": "^8.46.4",
43
+ "@alextheman/utility": "^2.19.0",
44
+ "@typescript-eslint/utils": "^8.47.0",
43
45
  "common-tags": "^1.8.2",
44
46
  "zod": "^4.1.12"
45
47
  },
@@ -48,28 +50,40 @@
48
50
  "@types/eslint": "^9.6.1",
49
51
  "@types/eslint-plugin-jsx-a11y": "^6.10.1",
50
52
  "@types/node": "^24.10.1",
51
- "@typescript-eslint/rule-tester": "^8.46.4",
52
- "globals": "^16.5.0",
53
- "husky": "^9.1.7",
54
- "prettier": "^3.6.2",
55
- "tsup": "^8.5.1",
56
- "tsx": "^4.20.6",
57
- "typescript": "^5.9.3",
58
- "vite-tsconfig-paths": "^5.1.4",
59
- "vitest": "^4.0.9"
60
- },
61
- "peerDependencies": {
53
+ "@typescript-eslint/rule-tester": "^8.47.0",
62
54
  "eslint": "^9.39.1",
63
55
  "eslint-config-prettier": "^10.1.8",
64
56
  "eslint-import-resolver-typescript": "^4.4.4",
65
57
  "eslint-plugin-import": "^2.32.0",
66
58
  "eslint-plugin-jsx-a11y": "^6.10.2",
67
- "eslint-plugin-package-json": "^0.74.0",
59
+ "eslint-plugin-package-json": "^0.85.0",
68
60
  "eslint-plugin-perfectionist": "^4.15.1",
69
61
  "eslint-plugin-prettier": "^5.5.4",
70
62
  "eslint-plugin-react": "^7.37.5",
71
63
  "eslint-plugin-react-hooks": "^7.0.1",
72
64
  "eslint-plugin-react-refresh": "^0.4.24",
73
- "typescript-eslint": "^8.46.4"
65
+ "globals": "^16.5.0",
66
+ "husky": "^9.1.7",
67
+ "prettier": "^3.6.2",
68
+ "tsup": "^8.5.1",
69
+ "tsx": "^4.20.6",
70
+ "typescript": "^5.9.3",
71
+ "typescript-eslint": "^8.47.0",
72
+ "vite-tsconfig-paths": "^5.1.4",
73
+ "vitest": "^4.0.13"
74
+ },
75
+ "peerDependencies": {
76
+ "eslint": ">=9.0.0",
77
+ "eslint-config-prettier": ">=10.0.0",
78
+ "eslint-import-resolver-typescript": ">=4.0.0",
79
+ "eslint-plugin-import": ">=2.0.0",
80
+ "eslint-plugin-jsx-a11y": ">=6.0.0",
81
+ "eslint-plugin-package-json": ">=0.85.0",
82
+ "eslint-plugin-perfectionist": ">=4.0.0",
83
+ "eslint-plugin-prettier": ">=5.0.0",
84
+ "eslint-plugin-react": ">=7.0.0",
85
+ "eslint-plugin-react-hooks": ">=7.0.0",
86
+ "eslint-plugin-react-refresh": ">=0.4.0",
87
+ "typescript-eslint": ">=8.0.0"
74
88
  }
75
89
  }