create-typescript-app 2.26.2 → 2.26.4

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.
@@ -9,7 +9,6 @@ declare const blockESLint: bingo_stratum.BlockWithAddons<{
9
9
  specifier: string;
10
10
  types?: boolean | undefined;
11
11
  }[];
12
- ignores: string[];
13
12
  extensions: (string | {
14
13
  files?: string[] | undefined;
15
14
  rules?: Record<string, "off" | "error" | "warn" | ["error" | "warn", unknown] | ["error" | "warn", unknown, unknown]> | {
@@ -22,6 +21,7 @@ declare const blockESLint: bingo_stratum.BlockWithAddons<{
22
21
  linterOptions?: unknown;
23
22
  plugins?: Record<string, string> | undefined;
24
23
  })[];
24
+ ignores: string[];
25
25
  explanations: string[];
26
26
  rules?: Record<string, "off" | "error" | "warn" | ["error" | "warn", unknown] | ["error" | "warn", unknown, unknown]> | {
27
27
  entries: Record<string, "off" | "error" | "warn" | ["error" | "warn", unknown] | ["error" | "warn", unknown, unknown]>;
@@ -24,14 +24,13 @@ const zRuleOptions = z.union([
24
24
  ])
25
25
  ])
26
26
  ]);
27
+ const zExtensionRuleGroup = z.object({
28
+ comment: z.string().optional(),
29
+ entries: z.record(z.string(), zRuleOptions)
30
+ });
27
31
  const zExtensionRules = z.union([
28
32
  z.record(z.string(), zRuleOptions),
29
- z.array(
30
- z.object({
31
- comment: z.string().optional(),
32
- entries: z.record(z.string(), zRuleOptions)
33
- })
34
- )
33
+ z.array(zExtensionRuleGroup)
35
34
  ]);
36
35
  const zExtension = z.object({
37
36
  extends: z.array(z.string()).optional(),
@@ -250,6 +249,24 @@ export default tseslint.config(
250
249
  };
251
250
  }
252
251
  });
252
+ function groupByComment(rulesGroups) {
253
+ const byComment = /* @__PURE__ */ new Map();
254
+ const grouped = [];
255
+ for (const group of rulesGroups) {
256
+ const existing = byComment.get(group.comment);
257
+ if (existing) {
258
+ existing.entries = {
259
+ ...existing.entries,
260
+ ...group.entries
261
+ };
262
+ continue;
263
+ } else {
264
+ byComment.set(group.comment, group);
265
+ grouped.push(group);
266
+ }
267
+ }
268
+ return grouped;
269
+ }
253
270
  function printExtension(extension) {
254
271
  return [
255
272
  "{",
@@ -268,7 +285,7 @@ function printExtensionRules(rules) {
268
285
  }
269
286
  return [
270
287
  "{",
271
- ...rules.flatMap((group) => [
288
+ ...groupByComment(rules).flatMap((group) => [
272
289
  printGroupComment(group.comment),
273
290
  ...Object.entries(group.entries).map(
274
291
  ([ruleName, options]) => `"${ruleName}": ${JSON.stringify(options)},`
@@ -9,11 +9,12 @@ const blockESLintPlugin = base.createBlock({
9
9
  about: {
10
10
  name: "ESLint Plugin"
11
11
  },
12
- produce() {
12
+ produce({ options }) {
13
+ const configFileName = `.eslint-doc-generatorrc.${options.type === "commonjs" ? "mjs" : "js"}`;
13
14
  return {
14
15
  addons: [
15
16
  blockCSpell({
16
- words: ["eslint-doc-generatorrc.js"]
17
+ words: ["eslint-doc-generatorrc"]
17
18
  }),
18
19
  blockDevelopmentDocs({
19
20
  sections: {
@@ -42,7 +43,7 @@ pnpm build:docs
42
43
  }),
43
44
  blockESLint({
44
45
  extensions: ['eslintPlugin.configs["flat/recommended"]'],
45
- ignores: [".eslint-doc-generatorrc.js", "docs/rules/*/*.ts"],
46
+ ignores: [configFileName, "docs/rules/*/*.ts"],
46
47
  imports: [
47
48
  {
48
49
  source: {
@@ -70,11 +71,6 @@ pnpm build:docs
70
71
  "eslint-doc-generator": "2.1.0",
71
72
  "eslint-plugin-eslint-plugin": "6.4.0"
72
73
  },
73
- peerDependencies: {
74
- "@typescript-eslint/parser": ">=8",
75
- eslint: ">=9",
76
- typescript: ">=5"
77
- },
78
74
  scripts: {
79
75
  "build:docs": "eslint-doc-generator",
80
76
  "lint:docs": "eslint-doc-generator --check"
@@ -88,7 +84,7 @@ pnpm build:docs
88
84
  })
89
85
  ],
90
86
  files: {
91
- ".eslint-doc-generatorrc.js": `import prettier from "prettier";
87
+ [configFileName]: `import prettier from "prettier";
92
88
 
93
89
  /** @type {import('eslint-doc-generator').GenerateOptions} */
94
90
  const config = {
@@ -38,8 +38,8 @@ declare const blockGitHubActionsCI: bingo_stratum.BlockWithAddons<{
38
38
  } | {
39
39
  uses: string;
40
40
  }))[];
41
- checkoutWith?: Record<string, string> | undefined;
42
41
  if?: string | undefined;
42
+ checkoutWith?: Record<string, string> | undefined;
43
43
  }[] | undefined;
44
44
  }, {
45
45
  access: "public" | "restricted";
@@ -50,6 +50,7 @@ declare const blockPackageJson: bingo_stratum.BlockWithAddons<{
50
50
  url?: string | undefined;
51
51
  email?: string | undefined;
52
52
  })[] | undefined;
53
+ publishConfig?: Record<string, unknown> | undefined;
53
54
  main?: string | undefined;
54
55
  types?: string | undefined;
55
56
  bugs?: string | {
@@ -65,7 +66,6 @@ declare const blockPackageJson: bingo_stratum.BlockWithAddons<{
65
66
  overrides?: Record<string, unknown> | undefined;
66
67
  os?: string[] | undefined;
67
68
  cpu?: string[] | undefined;
68
- publishConfig?: Record<string, unknown> | undefined;
69
69
  workspaces?: string[] | undefined;
70
70
  deprecated?: string | undefined;
71
71
  typings?: string | undefined;
@@ -2,8 +2,8 @@ import * as bingo_stratum from 'bingo-stratum';
2
2
 
3
3
  declare const blockReleaseIt: bingo_stratum.BlockWithAddons<{
4
4
  builders: {
5
- run: string;
6
5
  order: number;
6
+ run: string;
7
7
  }[];
8
8
  }, {
9
9
  access: "public" | "restricted";
@@ -2,6 +2,10 @@ import * as bingo_stratum from 'bingo-stratum';
2
2
 
3
3
  declare const blockVitest: bingo_stratum.BlockWithAddons<{
4
4
  exclude: string[];
5
+ coverage: {
6
+ exclude?: string[] | undefined;
7
+ include?: string[] | undefined;
8
+ };
5
9
  actionSteps: ({
6
10
  with?: Record<string, string> | undefined;
7
11
  env?: Record<string, string> | undefined;
@@ -11,10 +15,6 @@ declare const blockVitest: bingo_stratum.BlockWithAddons<{
11
15
  } | {
12
16
  uses: string;
13
17
  }))[];
14
- coverage: {
15
- exclude?: string[] | undefined;
16
- include?: string[] | undefined;
17
- };
18
18
  flags: string[];
19
19
  }, {
20
20
  access: "public" | "restricted";
@@ -553,7 +553,6 @@ declare const blocks: {
553
553
  specifier: string;
554
554
  types?: boolean | undefined;
555
555
  }[];
556
- ignores: string[];
557
556
  extensions: (string | {
558
557
  files?: string[] | undefined;
559
558
  rules?: Record<string, "off" | "error" | "warn" | ["error" | "warn", unknown] | ["error" | "warn", unknown, unknown]> | {
@@ -566,6 +565,7 @@ declare const blocks: {
566
565
  linterOptions?: unknown;
567
566
  plugins?: Record<string, string> | undefined;
568
567
  })[];
568
+ ignores: string[];
569
569
  explanations: string[];
570
570
  rules?: Record<string, "off" | "error" | "warn" | ["error" | "warn", unknown] | ["error" | "warn", unknown, unknown]> | {
571
571
  entries: Record<string, "off" | "error" | "warn" | ["error" | "warn", unknown] | ["error" | "warn", unknown, unknown]>;
@@ -1469,8 +1469,8 @@ declare const blocks: {
1469
1469
  } | {
1470
1470
  uses: string;
1471
1471
  }))[];
1472
- checkoutWith?: Record<string, string> | undefined;
1473
1472
  if?: string | undefined;
1473
+ checkoutWith?: Record<string, string> | undefined;
1474
1474
  }[] | undefined;
1475
1475
  }, {
1476
1476
  access: "public" | "restricted";
@@ -2211,6 +2211,7 @@ declare const blocks: {
2211
2211
  url?: string | undefined;
2212
2212
  email?: string | undefined;
2213
2213
  })[] | undefined;
2214
+ publishConfig?: Record<string, unknown> | undefined;
2214
2215
  main?: string | undefined;
2215
2216
  types?: string | undefined;
2216
2217
  bugs?: string | {
@@ -2226,7 +2227,6 @@ declare const blocks: {
2226
2227
  overrides?: Record<string, unknown> | undefined;
2227
2228
  os?: string[] | undefined;
2228
2229
  cpu?: string[] | undefined;
2229
- publishConfig?: Record<string, unknown> | undefined;
2230
2230
  workspaces?: string[] | undefined;
2231
2231
  deprecated?: string | undefined;
2232
2232
  typings?: string | undefined;
@@ -2806,8 +2806,8 @@ declare const blocks: {
2806
2806
  }>;
2807
2807
  blockReleaseIt: bingo_stratum.BlockWithAddons<{
2808
2808
  builders: {
2809
- run: string;
2810
2809
  order: number;
2810
+ run: string;
2811
2811
  }[];
2812
2812
  }, {
2813
2813
  access: "public" | "restricted";
@@ -3335,6 +3335,10 @@ declare const blocks: {
3335
3335
  }>;
3336
3336
  blockVitest: bingo_stratum.BlockWithAddons<{
3337
3337
  exclude: string[];
3338
+ coverage: {
3339
+ exclude?: string[] | undefined;
3340
+ include?: string[] | undefined;
3341
+ };
3338
3342
  actionSteps: ({
3339
3343
  with?: Record<string, string> | undefined;
3340
3344
  env?: Record<string, string> | undefined;
@@ -3344,10 +3348,6 @@ declare const blocks: {
3344
3348
  } | {
3345
3349
  uses: string;
3346
3350
  }))[];
3347
- coverage: {
3348
- exclude?: string[] | undefined;
3349
- include?: string[] | undefined;
3350
- };
3351
3351
  flags: string[];
3352
3352
  }, {
3353
3353
  access: "public" | "restricted";
@@ -1,5 +1,5 @@
1
1
  var name = "create-typescript-app";
2
- var version = "2.26.1";
2
+ var version = "2.26.3";
3
3
  var description = "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁";
4
4
  var repository = {
5
5
  type: "git",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-typescript-app",
3
- "version": "2.26.2",
3
+ "version": "2.26.4",
4
4
  "description": "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁",
5
5
  "repository": {
6
6
  "type": "git",