create-typescript-app 1.75.1 → 1.77.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.
Files changed (266) hide show
  1. package/README.md +1 -1
  2. package/lib/bin/help.js +35 -35
  3. package/lib/bin/help.js.map +1 -1
  4. package/lib/bin/promptForMode.js +6 -6
  5. package/lib/bin/promptForMode.js.map +1 -1
  6. package/lib/create/createWithOptions.js +12 -13
  7. package/lib/create/createWithOptions.js.map +1 -1
  8. package/lib/index.d.ts +45 -0
  9. package/lib/index.js +5 -0
  10. package/lib/index.js.map +1 -1
  11. package/lib/next/base.d.ts +101 -0
  12. package/lib/next/base.js +140 -0
  13. package/lib/next/base.js.map +1 -0
  14. package/lib/next/blocks/blockAllContributors.d.ts +48 -0
  15. package/lib/next/blocks/blockAllContributors.js +59 -0
  16. package/lib/next/blocks/blockAllContributors.js.map +1 -0
  17. package/lib/next/blocks/blockAreTheTypesWrong.d.ts +48 -0
  18. package/lib/next/blocks/blockAreTheTypesWrong.js +29 -0
  19. package/lib/next/blocks/blockAreTheTypesWrong.js.map +1 -0
  20. package/lib/next/blocks/blockCSpell.d.ts +51 -0
  21. package/lib/next/blocks/blockCSpell.js +77 -0
  22. package/lib/next/blocks/blockCSpell.js.map +1 -0
  23. package/lib/next/blocks/blockContributingDocs.d.ts +48 -0
  24. package/lib/next/blocks/blockContributingDocs.js +116 -0
  25. package/lib/next/blocks/blockContributingDocs.js.map +1 -0
  26. package/lib/next/blocks/blockContributorCovenant.d.ts +48 -0
  27. package/lib/next/blocks/blockContributorCovenant.js +151 -0
  28. package/lib/next/blocks/blockContributorCovenant.js.map +1 -0
  29. package/lib/next/blocks/blockDevelopmentDocs.d.ts +62 -0
  30. package/lib/next/blocks/blockDevelopmentDocs.js +86 -0
  31. package/lib/next/blocks/blockDevelopmentDocs.js.map +1 -0
  32. package/lib/next/blocks/blockESLint.d.ts +73 -0
  33. package/lib/next/blocks/blockESLint.js +225 -0
  34. package/lib/next/blocks/blockESLint.js.map +1 -0
  35. package/lib/next/blocks/blockESLintComments.d.ts +48 -0
  36. package/lib/next/blocks/blockESLintComments.js +26 -0
  37. package/lib/next/blocks/blockESLintComments.js.map +1 -0
  38. package/lib/next/blocks/blockESLintJSDoc.d.ts +48 -0
  39. package/lib/next/blocks/blockESLintJSDoc.js +25 -0
  40. package/lib/next/blocks/blockESLintJSDoc.js.map +1 -0
  41. package/lib/next/blocks/blockESLintJSONC.d.ts +48 -0
  42. package/lib/next/blocks/blockESLintJSONC.js +21 -0
  43. package/lib/next/blocks/blockESLintJSONC.js.map +1 -0
  44. package/lib/next/blocks/blockESLintMarkdown.d.ts +48 -0
  45. package/lib/next/blocks/blockESLintMarkdown.js +27 -0
  46. package/lib/next/blocks/blockESLintMarkdown.js.map +1 -0
  47. package/lib/next/blocks/blockESLintMoreStyling.d.ts +48 -0
  48. package/lib/next/blocks/blockESLintMoreStyling.js +34 -0
  49. package/lib/next/blocks/blockESLintMoreStyling.js.map +1 -0
  50. package/lib/next/blocks/blockESLintNode.d.ts +48 -0
  51. package/lib/next/blocks/blockESLintNode.js +33 -0
  52. package/lib/next/blocks/blockESLintNode.js.map +1 -0
  53. package/lib/next/blocks/blockESLintPackageJson.d.ts +48 -0
  54. package/lib/next/blocks/blockESLintPackageJson.js +26 -0
  55. package/lib/next/blocks/blockESLintPackageJson.js.map +1 -0
  56. package/lib/next/blocks/blockESLintPerfectionist.d.ts +48 -0
  57. package/lib/next/blocks/blockESLintPerfectionist.js +32 -0
  58. package/lib/next/blocks/blockESLintPerfectionist.js.map +1 -0
  59. package/lib/next/blocks/blockESLintRegexp.d.ts +48 -0
  60. package/lib/next/blocks/blockESLintRegexp.js +23 -0
  61. package/lib/next/blocks/blockESLintRegexp.js.map +1 -0
  62. package/lib/next/blocks/blockESLintYML.d.ts +48 -0
  63. package/lib/next/blocks/blockESLintYML.js +46 -0
  64. package/lib/next/blocks/blockESLintYML.js.map +1 -0
  65. package/lib/next/blocks/blockFunding.d.ts +48 -0
  66. package/lib/next/blocks/blockFunding.js +20 -0
  67. package/lib/next/blocks/blockFunding.js.map +1 -0
  68. package/lib/next/blocks/blockGitHubActionsCI.d.ts +60 -0
  69. package/lib/next/blocks/blockGitHubActionsCI.js +122 -0
  70. package/lib/next/blocks/blockGitHubActionsCI.js.map +1 -0
  71. package/lib/next/blocks/blockGitHubIssueTemplates.d.ts +48 -0
  72. package/lib/next/blocks/blockGitHubIssueTemplates.js +217 -0
  73. package/lib/next/blocks/blockGitHubIssueTemplates.js.map +1 -0
  74. package/lib/next/blocks/blockGitHubPRTemplate.d.ts +48 -0
  75. package/lib/next/blocks/blockGitHubPRTemplate.js +32 -0
  76. package/lib/next/blocks/blockGitHubPRTemplate.js.map +1 -0
  77. package/lib/next/blocks/blockGitignore.d.ts +50 -0
  78. package/lib/next/blocks/blockGitignore.js +23 -0
  79. package/lib/next/blocks/blockGitignore.js.map +1 -0
  80. package/lib/next/blocks/blockKnip.d.ts +48 -0
  81. package/lib/next/blocks/blockKnip.js +58 -0
  82. package/lib/next/blocks/blockKnip.js.map +1 -0
  83. package/lib/next/blocks/blockMITLicense.d.ts +48 -0
  84. package/lib/next/blocks/blockMITLicense.js +46 -0
  85. package/lib/next/blocks/blockMITLicense.js.map +1 -0
  86. package/lib/next/blocks/blockMarkdownlint.d.ts +50 -0
  87. package/lib/next/blocks/blockMarkdownlint.js +77 -0
  88. package/lib/next/blocks/blockMarkdownlint.js.map +1 -0
  89. package/lib/next/blocks/blockNvmrc.d.ts +48 -0
  90. package/lib/next/blocks/blockNvmrc.js +26 -0
  91. package/lib/next/blocks/blockNvmrc.js.map +1 -0
  92. package/lib/next/blocks/blockPRCompliance.d.ts +48 -0
  93. package/lib/next/blocks/blockPRCompliance.js +48 -0
  94. package/lib/next/blocks/blockPRCompliance.js.map +1 -0
  95. package/lib/next/blocks/blockPackageJson.d.ts +56 -0
  96. package/lib/next/blocks/blockPackageJson.js +81 -0
  97. package/lib/next/blocks/blockPackageJson.js.map +1 -0
  98. package/lib/next/blocks/blockPnpmDedupe.d.ts +48 -0
  99. package/lib/next/blocks/blockPnpmDedupe.js +51 -0
  100. package/lib/next/blocks/blockPnpmDedupe.js.map +1 -0
  101. package/lib/next/blocks/blockPrettier.d.ts +57 -0
  102. package/lib/next/blocks/blockPrettier.js +104 -0
  103. package/lib/next/blocks/blockPrettier.js.map +1 -0
  104. package/lib/next/blocks/blockPrettierPluginCurly.d.ts +48 -0
  105. package/lib/next/blocks/blockPrettierPluginCurly.js +20 -0
  106. package/lib/next/blocks/blockPrettierPluginCurly.js.map +1 -0
  107. package/lib/next/blocks/blockPrettierPluginPackageJson.d.ts +48 -0
  108. package/lib/next/blocks/blockPrettierPluginPackageJson.js +20 -0
  109. package/lib/next/blocks/blockPrettierPluginPackageJson.js.map +1 -0
  110. package/lib/next/blocks/blockPrettierPluginSh.d.ts +48 -0
  111. package/lib/next/blocks/blockPrettierPluginSh.js +20 -0
  112. package/lib/next/blocks/blockPrettierPluginSh.js.map +1 -0
  113. package/lib/next/blocks/blockREADME.d.ts +50 -0
  114. package/lib/next/blocks/blockREADME.js +63 -0
  115. package/lib/next/blocks/blockREADME.js.map +1 -0
  116. package/lib/next/blocks/blockReleaseIt.d.ts +48 -0
  117. package/lib/next/blocks/blockReleaseIt.js +126 -0
  118. package/lib/next/blocks/blockReleaseIt.js.map +1 -0
  119. package/lib/next/blocks/blockRenovate.d.ts +48 -0
  120. package/lib/next/blocks/blockRenovate.js +34 -0
  121. package/lib/next/blocks/blockRenovate.js.map +1 -0
  122. package/lib/next/blocks/blockSecurityDocs.d.ts +48 -0
  123. package/lib/next/blocks/blockSecurityDocs.js +28 -0
  124. package/lib/next/blocks/blockSecurityDocs.js.map +1 -0
  125. package/lib/next/blocks/blockTSup.d.ts +50 -0
  126. package/lib/next/blocks/blockTSup.js +78 -0
  127. package/lib/next/blocks/blockTSup.js.map +1 -0
  128. package/lib/next/blocks/blockTemplatedBy.d.ts +50 -0
  129. package/lib/next/blocks/blockTemplatedBy.js +34 -0
  130. package/lib/next/blocks/blockTemplatedBy.js.map +1 -0
  131. package/lib/next/blocks/blockTypeScript.d.ts +48 -0
  132. package/lib/next/blocks/blockTypeScript.js +109 -0
  133. package/lib/next/blocks/blockTypeScript.js.map +1 -0
  134. package/lib/next/blocks/blockVSCode.d.ts +57 -0
  135. package/lib/next/blocks/blockVSCode.js +87 -0
  136. package/lib/next/blocks/blockVSCode.js.map +1 -0
  137. package/lib/next/blocks/blockVitest.d.ts +55 -0
  138. package/lib/next/blocks/blockVitest.js +154 -0
  139. package/lib/next/blocks/blockVitest.js.map +1 -0
  140. package/lib/next/blocks/index.d.ts +43 -0
  141. package/lib/next/blocks/index.js +43 -0
  142. package/lib/next/blocks/index.js.map +1 -0
  143. package/lib/next/blocks/options.fakes.d.ts +13 -0
  144. package/lib/next/blocks/options.fakes.js +15 -0
  145. package/lib/next/blocks/options.fakes.js.map +1 -0
  146. package/lib/next/blocks/packageData.d.ts +5 -0
  147. package/lib/next/blocks/packageData.js +25 -0
  148. package/lib/next/blocks/packageData.js.map +1 -0
  149. package/lib/next/presetCommon.d.ts +99 -0
  150. package/lib/next/presetCommon.js +21 -0
  151. package/lib/next/presetCommon.js.map +1 -0
  152. package/lib/next/presetEverything.d.ts +99 -0
  153. package/lib/next/presetEverything.js +59 -0
  154. package/lib/next/presetEverything.js.map +1 -0
  155. package/lib/next/presetMinimal.d.ts +99 -0
  156. package/lib/next/presetMinimal.js +45 -0
  157. package/lib/next/presetMinimal.js.map +1 -0
  158. package/lib/next/template.d.ts +99 -0
  159. package/lib/next/template.js +21 -0
  160. package/lib/next/template.js.map +1 -0
  161. package/lib/next/utils/removeTrailingSlash.d.ts +3 -0
  162. package/lib/next/utils/removeTrailingSlash.js +7 -0
  163. package/lib/next/utils/removeTrailingSlash.js.map +1 -0
  164. package/lib/next/utils/sortObject.d.ts +5 -0
  165. package/lib/next/utils/sortObject.js +9 -0
  166. package/lib/next/utils/sortObject.js.map +1 -0
  167. package/lib/next/utils/swallowError.d.ts +3 -0
  168. package/lib/next/utils/swallowError.js +7 -0
  169. package/lib/next/utils/swallowError.js.map +1 -0
  170. package/lib/shared/cli/spinners.d.ts +1 -1
  171. package/lib/shared/cli/spinners.js.map +1 -1
  172. package/lib/shared/isUsingCreateEngine.d.ts +3 -0
  173. package/lib/shared/isUsingCreateEngine.js +7 -0
  174. package/lib/shared/isUsingCreateEngine.js.map +1 -0
  175. package/lib/shared/options/args.d.ts +39 -13
  176. package/lib/shared/options/args.js +5 -0
  177. package/lib/shared/options/args.js.map +1 -1
  178. package/lib/shared/options/augmentOptionsWithExcludes.js +2 -2
  179. package/lib/shared/options/augmentOptionsWithExcludes.js.map +1 -1
  180. package/lib/shared/options/createOptionDefaults/index.d.ts +2 -4
  181. package/lib/shared/options/createOptionDefaults/index.js +4 -13
  182. package/lib/shared/options/createOptionDefaults/index.js.map +1 -1
  183. package/lib/shared/options/createOptionDefaults/readDefaultsFromReadme.js +4 -1
  184. package/lib/shared/options/createOptionDefaults/readDefaultsFromReadme.js.map +1 -1
  185. package/lib/shared/options/createOptionDefaults/readEmails.d.ts +11 -0
  186. package/lib/shared/options/createOptionDefaults/readEmails.js +14 -0
  187. package/lib/shared/options/createOptionDefaults/readEmails.js.map +1 -0
  188. package/lib/shared/options/createOptionDefaults/readFunding.d.ts +3 -0
  189. package/lib/shared/options/createOptionDefaults/readFunding.js +11 -0
  190. package/lib/shared/options/createOptionDefaults/readFunding.js.map +1 -0
  191. package/lib/shared/options/createOptionDefaults/readGuide.d.ts +6 -0
  192. package/lib/shared/options/createOptionDefaults/readGuide.js +18 -0
  193. package/lib/shared/options/createOptionDefaults/readGuide.js.map +1 -0
  194. package/lib/shared/options/ensureRepositoryExists.js +1 -1
  195. package/lib/shared/options/ensureRepositoryExists.js.map +1 -1
  196. package/lib/shared/options/exclusionKeys.d.ts +1 -1
  197. package/lib/shared/options/exclusionKeys.js +6 -0
  198. package/lib/shared/options/exclusionKeys.js.map +1 -1
  199. package/lib/shared/options/optionsSchema.d.ts +6 -2
  200. package/lib/shared/options/optionsSchema.js +1 -0
  201. package/lib/shared/options/optionsSchema.js.map +1 -1
  202. package/lib/shared/options/readOptions.d.ts +1 -1
  203. package/lib/shared/options/readOptions.js +1 -0
  204. package/lib/shared/options/readOptions.js.map +1 -1
  205. package/lib/shared/types.d.ts +32 -24
  206. package/lib/steps/addOwnerAsAllContributor.js +2 -2
  207. package/lib/steps/addOwnerAsAllContributor.js.map +1 -1
  208. package/lib/steps/clearUnnecessaryFiles.js +3 -4
  209. package/lib/steps/clearUnnecessaryFiles.js.map +1 -1
  210. package/lib/steps/finalizeDependencies.js +47 -44
  211. package/lib/steps/finalizeDependencies.js.map +1 -1
  212. package/lib/steps/populateCSpellDictionary.js +7 -7
  213. package/lib/steps/populateCSpellDictionary.js.map +1 -1
  214. package/lib/steps/removeSetupScripts.js +9 -3
  215. package/lib/steps/removeSetupScripts.js.map +1 -1
  216. package/lib/steps/uninstallPackages.js +10 -3
  217. package/lib/steps/uninstallPackages.js.map +1 -1
  218. package/lib/steps/updateReadme.d.ts +1 -1
  219. package/lib/steps/updateReadme.js +1 -1
  220. package/lib/steps/updateReadme.js.map +1 -1
  221. package/lib/steps/writeReadme/index.js +19 -19
  222. package/lib/steps/writeReadme/index.js.map +1 -1
  223. package/lib/steps/writing/creation/createCSpellConfig.d.ts +7 -0
  224. package/lib/steps/writing/creation/createCSpellConfig.js +27 -0
  225. package/lib/steps/writing/creation/createCSpellConfig.js.map +1 -0
  226. package/lib/steps/writing/creation/createDotGitignore.js +7 -5
  227. package/lib/steps/writing/creation/createDotGitignore.js.map +1 -1
  228. package/lib/steps/writing/creation/createESLintConfig.js +22 -46
  229. package/lib/steps/writing/creation/createESLintConfig.js.map +1 -1
  230. package/lib/steps/writing/creation/createTsupConfig.js +10 -10
  231. package/lib/steps/writing/creation/createTsupConfig.js.map +1 -1
  232. package/lib/steps/writing/creation/dotGitHub/createDevelopment/index.js +57 -41
  233. package/lib/steps/writing/creation/dotGitHub/createDevelopment/index.js.map +1 -1
  234. package/lib/steps/writing/creation/dotGitHub/createDevelopment/splitIntoSections.js +1 -1
  235. package/lib/steps/writing/creation/dotGitHub/createDevelopment/splitIntoSections.js.map +1 -1
  236. package/lib/steps/writing/creation/dotGitHub/createDotGitHubFiles.js +5 -5
  237. package/lib/steps/writing/creation/dotGitHub/createDotGitHubFiles.js.map +1 -1
  238. package/lib/steps/writing/creation/dotGitHub/createMultiWorkflowFile.d.ts +11 -9
  239. package/lib/steps/writing/creation/dotGitHub/createMultiWorkflowFile.js.map +1 -1
  240. package/lib/steps/writing/creation/dotGitHub/createSoloWorkflowFile.d.ts +16 -16
  241. package/lib/steps/writing/creation/dotGitHub/createSoloWorkflowFile.js.map +1 -1
  242. package/lib/steps/writing/creation/dotGitHub/createWorkflows.js +5 -1
  243. package/lib/steps/writing/creation/dotGitHub/createWorkflows.js.map +1 -1
  244. package/lib/steps/writing/creation/formatters/formatIgnoreFile.d.ts +1 -1
  245. package/lib/steps/writing/creation/formatters/formatIgnoreFile.js +1 -1
  246. package/lib/steps/writing/creation/formatters/formatIgnoreFile.js.map +1 -1
  247. package/lib/steps/writing/creation/formatters/formatTypeScript.js +1 -1
  248. package/lib/steps/writing/creation/formatters/formatTypeScript.js.map +1 -1
  249. package/lib/steps/writing/creation/formatters/formatYaml.js +3 -1
  250. package/lib/steps/writing/creation/formatters/formatYaml.js.map +1 -1
  251. package/lib/steps/writing/creation/index.d.ts +1 -1
  252. package/lib/steps/writing/creation/index.js +49 -1
  253. package/lib/steps/writing/creation/index.js.map +1 -1
  254. package/lib/steps/writing/creation/rootFiles.js +5 -15
  255. package/lib/steps/writing/creation/rootFiles.js.map +1 -1
  256. package/lib/steps/writing/creation/writePackageJson.js +69 -62
  257. package/lib/steps/writing/creation/writePackageJson.js.map +1 -1
  258. package/lib/steps/writing/types.d.ts +1 -1
  259. package/lib/steps/writing/writeStructure.js +9 -1
  260. package/lib/steps/writing/writeStructure.js.map +1 -1
  261. package/lib/steps/writing/writeStructureWorker.js +1 -1
  262. package/lib/steps/writing/writeStructureWorker.js.map +1 -1
  263. package/package.json +57 -52
  264. package/lib/shared/options/createOptionDefaults/readDefaultsFromDevelopment.d.ts +0 -8
  265. package/lib/shared/options/createOptionDefaults/readDefaultsFromDevelopment.js +0 -22
  266. package/lib/shared/options/createOptionDefaults/readDefaultsFromDevelopment.js.map +0 -1
@@ -0,0 +1,151 @@
1
+ import { base } from "../base.js";
2
+ const blockContributorCovenant = base.createBlock({
3
+ about: {
4
+ name: "Contributor Covenant"
5
+ },
6
+ produce({ options }) {
7
+ return {
8
+ files: {
9
+ ".github": {
10
+ "CODE_OF_CONDUCT.md": `# Contributor Covenant Code of Conduct
11
+
12
+ ## Our Pledge
13
+
14
+ We as members, contributors, and leaders pledge to make participation in our
15
+ community a harassment-free experience for everyone, regardless of age, body
16
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
17
+ identity and expression, level of experience, education, socio-economic status,
18
+ nationality, personal appearance, race, caste, color, religion, or sexual
19
+ identity and orientation.
20
+
21
+ We pledge to act and interact in ways that contribute to an open, welcoming,
22
+ diverse, inclusive, and healthy community.
23
+
24
+ ## Our Standards
25
+
26
+ Examples of behavior that contributes to a positive environment for our
27
+ community include:
28
+
29
+ - Demonstrating empathy and kindness toward other people
30
+ - Being respectful of differing opinions, viewpoints, and experiences
31
+ - Giving and gracefully accepting constructive feedback
32
+ - Accepting responsibility and apologizing to those affected by our mistakes,
33
+ and learning from the experience
34
+ - Focusing on what is best not just for us as individuals, but for the overall
35
+ community
36
+
37
+ Examples of unacceptable behavior include:
38
+
39
+ - The use of sexualized language or imagery, and sexual attention or advances of
40
+ any kind
41
+ - Trolling, insulting or derogatory comments, and personal or political attacks
42
+ - Public or private harassment
43
+ - Publishing others' private information, such as a physical or email address,
44
+ without their explicit permission
45
+ - Other conduct which could reasonably be considered inappropriate in a
46
+ professional setting
47
+
48
+ ## Enforcement Responsibilities
49
+
50
+ Community leaders are responsible for clarifying and enforcing our standards of
51
+ acceptable behavior and will take appropriate and fair corrective action in
52
+ response to any behavior that they deem inappropriate, threatening, offensive,
53
+ or harmful.
54
+
55
+ Community leaders have the right and responsibility to remove, edit, or reject
56
+ comments, commits, code, wiki edits, issues, and other contributions that are
57
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
58
+ decisions when appropriate.
59
+
60
+ ## Scope
61
+
62
+ This Code of Conduct applies within all community spaces, and also applies when
63
+ an individual is officially representing the community in public spaces.
64
+ Examples of representing our community include using an official e-mail address,
65
+ posting via an official social media account, or acting as an appointed
66
+ representative at an online or offline event.
67
+
68
+ ## Enforcement
69
+
70
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
71
+ reported to the community leaders responsible for enforcement at
72
+ ${options.email.github}.
73
+ All complaints will be reviewed and investigated promptly and fairly.
74
+
75
+ All community leaders are obligated to respect the privacy and security of the
76
+ reporter of any incident.
77
+
78
+ ## Enforcement Guidelines
79
+
80
+ Community leaders will follow these Community Impact Guidelines in determining
81
+ the consequences for any action they deem in violation of this Code of Conduct:
82
+
83
+ ### 1. Correction
84
+
85
+ **Community Impact**: Use of inappropriate language or other behavior deemed
86
+ unprofessional or unwelcome in the community.
87
+
88
+ **Consequence**: A private, written warning from community leaders, providing
89
+ clarity around the nature of the violation and an explanation of why the
90
+ behavior was inappropriate. A public apology may be requested.
91
+
92
+ ### 2. Warning
93
+
94
+ **Community Impact**: A violation through a single incident or series of
95
+ actions.
96
+
97
+ **Consequence**: A warning with consequences for continued behavior. No
98
+ interaction with the people involved, including unsolicited interaction with
99
+ those enforcing the Code of Conduct, for a specified period of time. This
100
+ includes avoiding interactions in community spaces as well as external channels
101
+ like social media. Violating these terms may lead to a temporary or permanent
102
+ ban.
103
+
104
+ ### 3. Temporary Ban
105
+
106
+ **Community Impact**: A serious violation of community standards, including
107
+ sustained inappropriate behavior.
108
+
109
+ **Consequence**: A temporary ban from any sort of interaction or public
110
+ communication with the community for a specified period of time. No public or
111
+ private interaction with the people involved, including unsolicited interaction
112
+ with those enforcing the Code of Conduct, is allowed during this period.
113
+ Violating these terms may lead to a permanent ban.
114
+
115
+ ### 4. Permanent Ban
116
+
117
+ **Community Impact**: Demonstrating a pattern of violation of community
118
+ standards, including sustained inappropriate behavior, harassment of an
119
+ individual, or aggression toward or disparagement of classes of individuals.
120
+
121
+ **Consequence**: A permanent ban from any sort of public interaction within the
122
+ community.
123
+
124
+ ## Attribution
125
+
126
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
127
+ version 2.1, available at
128
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
129
+
130
+ Community Impact Guidelines were inspired by
131
+ [Mozilla's code of conduct enforcement ladder][mozilla coc].
132
+
133
+ For answers to common questions about this code of conduct, see the FAQ at
134
+ [https://www.contributor-covenant.org/faq][faq]. Translations are available at
135
+ [https://www.contributor-covenant.org/translations][translations].
136
+
137
+ [homepage]: https://www.contributor-covenant.org
138
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
139
+ [mozilla coc]: https://github.com/mozilla/diversity
140
+ [faq]: https://www.contributor-covenant.org/faq
141
+ [translations]: https://www.contributor-covenant.org/translations
142
+ `
143
+ }
144
+ }
145
+ };
146
+ }
147
+ });
148
+ export {
149
+ blockContributorCovenant
150
+ };
151
+ //# sourceMappingURL=blockContributorCovenant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/next/blocks/blockContributorCovenant.ts"],"sourcesContent":["import { base } from \"../base.js\";\n\nexport const blockContributorCovenant = base.createBlock({\n\tabout: {\n\t\tname: \"Contributor Covenant\",\n\t},\n\tproduce({ options }) {\n\t\treturn {\n\t\t\tfiles: {\n\t\t\t\t\".github\": {\n\t\t\t\t\t\"CODE_OF_CONDUCT.md\": `# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participation in our\ncommunity a harassment-free experience for everyone, regardless of age, body\nsize, visible or invisible disability, ethnicity, sex characteristics, gender\nidentity and expression, level of experience, education, socio-economic status,\nnationality, personal appearance, race, caste, color, religion, or sexual\nidentity and orientation.\n\nWe pledge to act and interact in ways that contribute to an open, welcoming,\ndiverse, inclusive, and healthy community.\n\n## Our Standards\n\nExamples of behavior that contributes to a positive environment for our\ncommunity include:\n\n- Demonstrating empathy and kindness toward other people\n- Being respectful of differing opinions, viewpoints, and experiences\n- Giving and gracefully accepting constructive feedback\n- Accepting responsibility and apologizing to those affected by our mistakes,\n and learning from the experience\n- Focusing on what is best not just for us as individuals, but for the overall\n community\n\nExamples of unacceptable behavior include:\n\n- The use of sexualized language or imagery, and sexual attention or advances of\nany kind\n- Trolling, insulting or derogatory comments, and personal or political attacks\n- Public or private harassment\n- Publishing others' private information, such as a physical or email address,\nwithout their explicit permission\n- Other conduct which could reasonably be considered inappropriate in a\nprofessional setting\n\n## Enforcement Responsibilities\n\nCommunity leaders are responsible for clarifying and enforcing our standards of\nacceptable behavior and will take appropriate and fair corrective action in\nresponse to any behavior that they deem inappropriate, threatening, offensive,\nor harmful.\n\nCommunity leaders have the right and responsibility to remove, edit, or reject\ncomments, commits, code, wiki edits, issues, and other contributions that are\nnot aligned to this Code of Conduct, and will communicate reasons for moderation\ndecisions when appropriate.\n\n## Scope\n\nThis Code of Conduct applies within all community spaces, and also applies when\nan individual is officially representing the community in public spaces.\nExamples of representing our community include using an official e-mail address,\nposting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported to the community leaders responsible for enforcement at\n${options.email.github}.\nAll complaints will be reviewed and investigated promptly and fairly.\n\nAll community leaders are obligated to respect the privacy and security of the\nreporter of any incident.\n\n## Enforcement Guidelines\n\nCommunity leaders will follow these Community Impact Guidelines in determining\nthe consequences for any action they deem in violation of this Code of Conduct:\n\n### 1. Correction\n\n**Community Impact**: Use of inappropriate language or other behavior deemed\nunprofessional or unwelcome in the community.\n\n**Consequence**: A private, written warning from community leaders, providing\nclarity around the nature of the violation and an explanation of why the\nbehavior was inappropriate. A public apology may be requested.\n\n### 2. Warning\n\n**Community Impact**: A violation through a single incident or series of\nactions.\n\n**Consequence**: A warning with consequences for continued behavior. No\ninteraction with the people involved, including unsolicited interaction with\nthose enforcing the Code of Conduct, for a specified period of time. This\nincludes avoiding interactions in community spaces as well as external channels\nlike social media. Violating these terms may lead to a temporary or permanent\nban.\n\n### 3. Temporary Ban\n\n**Community Impact**: A serious violation of community standards, including\nsustained inappropriate behavior.\n\n**Consequence**: A temporary ban from any sort of interaction or public\ncommunication with the community for a specified period of time. No public or\nprivate interaction with the people involved, including unsolicited interaction\nwith those enforcing the Code of Conduct, is allowed during this period.\nViolating these terms may lead to a permanent ban.\n\n### 4. Permanent Ban\n\n**Community Impact**: Demonstrating a pattern of violation of community\nstandards, including sustained inappropriate behavior, harassment of an\nindividual, or aggression toward or disparagement of classes of individuals.\n\n**Consequence**: A permanent ban from any sort of public interaction within the\ncommunity.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage],\nversion 2.1, available at\n[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].\n\nCommunity Impact Guidelines were inspired by\n[Mozilla's code of conduct enforcement ladder][mozilla coc].\n\nFor answers to common questions about this code of conduct, see the FAQ at\n[https://www.contributor-covenant.org/faq][faq]. Translations are available at\n[https://www.contributor-covenant.org/translations][translations].\n\n[homepage]: https://www.contributor-covenant.org\n[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html\n[mozilla coc]: https://github.com/mozilla/diversity\n[faq]: https://www.contributor-covenant.org/faq\n[translations]: https://www.contributor-covenant.org/translations\n`,\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t},\n});\n"],"mappings":"AAAA,SAAS,YAAY;AAEd,MAAM,2BAA2B,KAAK,YAAY;AAAA,EACxD,OAAO;AAAA,IACN,MAAM;AAAA,EACP;AAAA,EACA,QAAQ,EAAE,QAAQ,GAAG;AACpB,WAAO;AAAA,MACN,OAAO;AAAA,QACN,WAAW;AAAA,UACV,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA8DzB,QAAQ,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAuElB;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD,CAAC;","names":[]}
@@ -0,0 +1,62 @@
1
+ import * as create from 'create';
2
+
3
+ declare const blockDevelopmentDocs: create.BlockWithAddons<{
4
+ hints: string[];
5
+ sections: Record<string, {
6
+ contents?: string | {
7
+ after?: string[] | undefined;
8
+ before?: string | undefined;
9
+ items?: string[] | undefined;
10
+ plural?: string | undefined;
11
+ } | undefined;
12
+ innerSections?: {
13
+ contents: string;
14
+ heading: string;
15
+ }[] | undefined;
16
+ }>;
17
+ }, {
18
+ description: string;
19
+ email: {
20
+ github: string;
21
+ npm: string;
22
+ };
23
+ title: string;
24
+ owner: string;
25
+ repository: string;
26
+ access?: "public" | "restricted" | undefined;
27
+ author?: string | undefined;
28
+ bin?: string | undefined;
29
+ login?: string | undefined;
30
+ contributors?: {
31
+ name: string;
32
+ avatar_url: string;
33
+ contributions: string[];
34
+ login: string;
35
+ profile: string;
36
+ }[] | undefined;
37
+ documentation?: string | undefined;
38
+ funding?: string | undefined;
39
+ guide?: {
40
+ href: string;
41
+ title: string;
42
+ } | undefined;
43
+ hideTemplatedBy?: boolean | undefined;
44
+ keywords?: string[] | undefined;
45
+ logo?: {
46
+ alt: string;
47
+ src: string;
48
+ } | undefined;
49
+ node?: {
50
+ minimum: string;
51
+ pinned?: string | undefined;
52
+ } | undefined;
53
+ packageData?: {
54
+ dependencies?: Record<string, string> | undefined;
55
+ devDependencies?: Record<string, string> | undefined;
56
+ scripts?: Record<string, string> | undefined;
57
+ } | undefined;
58
+ preserveGeneratedFrom?: boolean | undefined;
59
+ version?: string | undefined;
60
+ }>;
61
+
62
+ export { blockDevelopmentDocs };
@@ -0,0 +1,86 @@
1
+ import { z } from "zod";
2
+ import { base } from "../base.js";
3
+ const zInnerSection = z.object({
4
+ contents: z.string(),
5
+ heading: z.string()
6
+ });
7
+ function printInnerSection(innerSection) {
8
+ return [`### ${innerSection.heading}`, ``, innerSection.contents];
9
+ }
10
+ const zSection = z.object({
11
+ contents: z.union([
12
+ z.string(),
13
+ z.object({
14
+ after: z.array(z.string()).optional(),
15
+ before: z.string().optional(),
16
+ items: z.array(z.string()).optional(),
17
+ plural: z.string().optional()
18
+ })
19
+ ]).optional(),
20
+ innerSections: z.array(zInnerSection).default([]).optional()
21
+ });
22
+ function printSection(heading, section) {
23
+ if (typeof section === "string") {
24
+ return section;
25
+ }
26
+ const innerSections = section.innerSections?.flatMap(printInnerSection) ?? [];
27
+ if (section.contents === void 0) {
28
+ return innerSections;
29
+ }
30
+ const contents = typeof section.contents === "string" ? { before: section.contents } : section.contents;
31
+ return [
32
+ `## ${heading}`,
33
+ ``,
34
+ ...contents.before ? [contents.before] : [],
35
+ ...contents.items?.sort(
36
+ (a, b) => a.replaceAll("`", "").localeCompare(b.replaceAll("`", ""))
37
+ ) ?? [],
38
+ ...contents.items?.length && contents.plural ? [``, contents.plural] : [],
39
+ ...contents.after ?? [],
40
+ ...innerSections
41
+ ];
42
+ }
43
+ const blockDevelopmentDocs = base.createBlock({
44
+ about: {
45
+ name: "Development Docs"
46
+ },
47
+ addons: {
48
+ hints: z.array(z.string()).default([]),
49
+ sections: z.record(z.string(), zSection).default({})
50
+ },
51
+ produce({ addons, options }) {
52
+ const lines = [
53
+ `# Development`,
54
+ ``,
55
+ ...options.guide ? [
56
+ `> If you'd like a more guided walkthrough, see [${options.guide.title}](${options.guide.href}).`,
57
+ `> It'll walk you through the common activities you'll need to contribute.`
58
+ ] : [],
59
+ ``,
60
+ `After [forking the repo from GitHub](https://help.github.com/articles/fork-a-repo) and [installing pnpm](https://pnpm.io/installation):`,
61
+ ``,
62
+ `\`\`\`shell`,
63
+ `git clone https://github.com/<your-name-here>/${options.repository}`,
64
+ `cd ${options.repository}`,
65
+ `pnpm install`,
66
+ `\`\`\``,
67
+ ``,
68
+ `> This repository includes a list of suggested VS Code extensions.`,
69
+ `> It's a good idea to use [VS Code](https://code.visualstudio.com) and accept its suggestion to install them, as they'll help with development.`,
70
+ ``,
71
+ ...Object.entries(addons.sections).sort(([a], [b]) => a.localeCompare(b)).flatMap(([heading, section]) => printSection(heading, section)),
72
+ ...options.documentation ? [options.documentation] : []
73
+ ];
74
+ return {
75
+ files: {
76
+ ".github": {
77
+ "DEVELOPMENT.md": lines.join("\n")
78
+ }
79
+ }
80
+ };
81
+ }
82
+ });
83
+ export {
84
+ blockDevelopmentDocs
85
+ };
86
+ //# sourceMappingURL=blockDevelopmentDocs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/next/blocks/blockDevelopmentDocs.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { base } from \"../base.js\";\n\nconst zInnerSection = z.object({\n\tcontents: z.string(),\n\theading: z.string(),\n});\n\ntype InnerSection = z.infer<typeof zInnerSection>;\n\nfunction printInnerSection(innerSection: InnerSection) {\n\treturn [`### ${innerSection.heading}`, ``, innerSection.contents];\n}\n\nconst zSection = z.object({\n\tcontents: z\n\t\t.union([\n\t\t\tz.string(),\n\t\t\tz.object({\n\t\t\t\tafter: z.array(z.string()).optional(),\n\t\t\t\tbefore: z.string().optional(),\n\t\t\t\titems: z.array(z.string()).optional(),\n\t\t\t\tplural: z.string().optional(),\n\t\t\t}),\n\t\t])\n\t\t.optional(),\n\tinnerSections: z.array(zInnerSection).default([]).optional(),\n});\n\ntype Section = z.infer<typeof zSection>;\n\nfunction printSection(heading: string, section: Section) {\n\tif (typeof section === \"string\") {\n\t\treturn section;\n\t}\n\n\tconst innerSections = section.innerSections?.flatMap(printInnerSection) ?? [];\n\n\tif (section.contents === undefined) {\n\t\treturn innerSections;\n\t}\n\n\tconst contents =\n\t\ttypeof section.contents === \"string\"\n\t\t\t? { before: section.contents }\n\t\t\t: section.contents;\n\n\treturn [\n\t\t`## ${heading}`,\n\t\t``,\n\t\t...(contents.before ? [contents.before] : []),\n\t\t...(contents.items?.sort((a, b) =>\n\t\t\ta.replaceAll(\"`\", \"\").localeCompare(b.replaceAll(\"`\", \"\")),\n\t\t) ?? []),\n\t\t...(contents.items?.length && contents.plural ? [``, contents.plural] : []),\n\t\t...(contents.after ?? []),\n\t\t...innerSections,\n\t];\n}\n\nexport const blockDevelopmentDocs = base.createBlock({\n\tabout: {\n\t\tname: \"Development Docs\",\n\t},\n\taddons: {\n\t\thints: z.array(z.string()).default([]),\n\t\tsections: z.record(z.string(), zSection).default({}),\n\t},\n\tproduce({ addons, options }) {\n\t\tconst lines = [\n\t\t\t`# Development`,\n\t\t\t``,\n\t\t\t...(options.guide\n\t\t\t\t? [\n\t\t\t\t\t\t`> If you'd like a more guided walkthrough, see [${options.guide.title}](${options.guide.href}).`,\n\t\t\t\t\t\t`> It'll walk you through the common activities you'll need to contribute.`,\n\t\t\t\t\t]\n\t\t\t\t: []),\n\t\t\t``,\n\t\t\t`After [forking the repo from GitHub](https://help.github.com/articles/fork-a-repo) and [installing pnpm](https://pnpm.io/installation):`,\n\t\t\t``,\n\t\t\t`\\`\\`\\`shell`,\n\t\t\t`git clone https://github.com/<your-name-here>/${options.repository}`,\n\t\t\t`cd ${options.repository}`,\n\t\t\t`pnpm install`,\n\t\t\t`\\`\\`\\``,\n\t\t\t``,\n\t\t\t`> This repository includes a list of suggested VS Code extensions.`,\n\t\t\t`> It's a good idea to use [VS Code](https://code.visualstudio.com) and accept its suggestion to install them, as they'll help with development.`,\n\t\t\t``,\n\t\t\t...Object.entries(addons.sections)\n\t\t\t\t.sort(([a], [b]) => a.localeCompare(b))\n\t\t\t\t.flatMap(([heading, section]) => printSection(heading, section)),\n\t\t\t...(options.documentation ? [options.documentation] : []),\n\t\t];\n\n\t\treturn {\n\t\t\tfiles: {\n\t\t\t\t\".github\": {\n\t\t\t\t\t\"DEVELOPMENT.md\": lines.join(\"\\n\"),\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t},\n});\n"],"mappings":"AAAA,SAAS,SAAS;AAElB,SAAS,YAAY;AAErB,MAAM,gBAAgB,EAAE,OAAO;AAAA,EAC9B,UAAU,EAAE,OAAO;AAAA,EACnB,SAAS,EAAE,OAAO;AACnB,CAAC;AAID,SAAS,kBAAkB,cAA4B;AACtD,SAAO,CAAC,OAAO,aAAa,OAAO,IAAI,IAAI,aAAa,QAAQ;AACjE;AAEA,MAAM,WAAW,EAAE,OAAO;AAAA,EACzB,UAAU,EACR,MAAM;AAAA,IACN,EAAE,OAAO;AAAA,IACT,EAAE,OAAO;AAAA,MACR,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS;AAAA,MACpC,QAAQ,EAAE,OAAO,EAAE,SAAS;AAAA,MAC5B,OAAO,EAAE,MA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;AAAA,MACb;AAAA,MACA;AAAA,MACA,GAAI,QAAQ,QACT;AAAA,QACA,mDAAmD,QAAQ,MAAM,KAAK,KAAK,QAAQ,MAAM,IAAI;AAAA,QAC7F;AAAA,MACD,IACC,CAAC;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,iDAAiD,QAAQ,UAAU;AAAA,MACnE,MAAM,QAAQ,UAAU;AAAA,MACxB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG,OAAO,QAAQ,OAAO,QAAQ,EAC/B,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,EACrC,QAAQ,CAAC,CAAC,SAAS,OAAO,MAAM,aAAa,SAAS,OAAO,CAAC;AAAA,MAChE,GAAI,QAAQ,gBAAgB,CAAC,QAAQ,aAAa,IAAI,CAAC;AAAA,IACxD;AAEA,WAAO;AAAA,MACN,OAAO;AAAA,QACN,WAAW;AAAA,UACV,kBAAkB,MAAM,KAAK,IAAI;AAAA,QAClC;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD,CAAC;","names":[]}
@@ -0,0 +1,73 @@
1
+ import * as create from 'create';
2
+
3
+ declare const blockESLint: create.BlockWithAddons<{
4
+ extensions: (string | {
5
+ plugins?: Record<string, string> | undefined;
6
+ files?: string[] | undefined;
7
+ settings?: Record<string, unknown> | undefined;
8
+ extends?: string[] | undefined;
9
+ languageOptions?: unknown;
10
+ linterOptions?: unknown;
11
+ rules?: Record<string, "off" | "error" | "warn" | ["error" | "warn", unknown] | ["error" | "warn", unknown, unknown]> | {
12
+ entries: Record<string, "off" | "error" | "warn" | ["error" | "warn", unknown] | ["error" | "warn", unknown, unknown]>;
13
+ comment?: string | undefined;
14
+ }[] | undefined;
15
+ })[];
16
+ ignores: string[];
17
+ imports: {
18
+ source: string;
19
+ specifier: string;
20
+ types?: boolean | undefined;
21
+ }[];
22
+ settings?: Record<string, unknown> | undefined;
23
+ rules?: Record<string, "off" | "error" | "warn" | ["error" | "warn", unknown] | ["error" | "warn", unknown, unknown]> | {
24
+ entries: Record<string, "off" | "error" | "warn" | ["error" | "warn", unknown] | ["error" | "warn", unknown, unknown]>;
25
+ comment?: string | undefined;
26
+ }[] | undefined;
27
+ beforeLint?: string | undefined;
28
+ }, {
29
+ description: string;
30
+ email: {
31
+ github: string;
32
+ npm: string;
33
+ };
34
+ title: string;
35
+ owner: string;
36
+ repository: string;
37
+ access?: "public" | "restricted" | undefined;
38
+ author?: string | undefined;
39
+ bin?: string | undefined;
40
+ login?: string | undefined;
41
+ contributors?: {
42
+ name: string;
43
+ avatar_url: string;
44
+ contributions: string[];
45
+ login: string;
46
+ profile: string;
47
+ }[] | undefined;
48
+ documentation?: string | undefined;
49
+ funding?: string | undefined;
50
+ guide?: {
51
+ href: string;
52
+ title: string;
53
+ } | undefined;
54
+ hideTemplatedBy?: boolean | undefined;
55
+ keywords?: string[] | undefined;
56
+ logo?: {
57
+ alt: string;
58
+ src: string;
59
+ } | undefined;
60
+ node?: {
61
+ minimum: string;
62
+ pinned?: string | undefined;
63
+ } | undefined;
64
+ packageData?: {
65
+ dependencies?: Record<string, string> | undefined;
66
+ devDependencies?: Record<string, string> | undefined;
67
+ scripts?: Record<string, string> | undefined;
68
+ } | undefined;
69
+ preserveGeneratedFrom?: boolean | undefined;
70
+ version?: string | undefined;
71
+ }>;
72
+
73
+ export { blockESLint };
@@ -0,0 +1,225 @@
1
+ import { parse as parsePackageName } from "parse-package-name";
2
+ import { z } from "zod";
3
+ import { base } from "../base.js";
4
+ import { blockCSpell } from "./blockCSpell.js";
5
+ import { blockDevelopmentDocs } from "./blockDevelopmentDocs.js";
6
+ import { blockGitHubActionsCI } from "./blockGitHubActionsCI.js";
7
+ import { blockPackageJson } from "./blockPackageJson.js";
8
+ import { blockVSCode } from "./blockVSCode.js";
9
+ import { getPackageDependencies } from "./packageData.js";
10
+ const zRuleOptions = z.union([
11
+ z.literal("error"),
12
+ z.literal("off"),
13
+ z.literal("warn"),
14
+ z.union([
15
+ z.tuple([z.union([z.literal("error"), z.literal("warn")]), z.unknown()]),
16
+ z.tuple([
17
+ z.union([z.literal("error"), z.literal("warn")]),
18
+ z.unknown(),
19
+ z.unknown()
20
+ ])
21
+ ])
22
+ ]);
23
+ const zExtensionRules = z.union([
24
+ z.record(z.string(), zRuleOptions),
25
+ z.array(
26
+ z.object({
27
+ comment: z.string().optional(),
28
+ entries: z.record(z.string(), zRuleOptions)
29
+ })
30
+ )
31
+ ]);
32
+ const zExtension = z.object({
33
+ extends: z.array(z.string()).optional(),
34
+ files: z.array(z.string()).optional(),
35
+ languageOptions: z.unknown().optional(),
36
+ linterOptions: z.unknown().optional(),
37
+ plugins: z.record(z.string(), z.string()).optional(),
38
+ rules: zExtensionRules.optional(),
39
+ settings: z.record(z.string(), z.unknown()).optional()
40
+ });
41
+ const zPackageImport = z.object({
42
+ source: z.string(),
43
+ specifier: z.string(),
44
+ types: z.boolean().optional()
45
+ });
46
+ const blockESLint = base.createBlock({
47
+ about: {
48
+ name: "ESLint"
49
+ },
50
+ addons: {
51
+ beforeLint: z.string().optional(),
52
+ extensions: z.array(z.union([z.string(), zExtension])).default([]),
53
+ ignores: z.array(z.string()).default([]),
54
+ imports: z.array(zPackageImport).default([]),
55
+ rules: zExtensionRules.optional(),
56
+ settings: z.record(z.string(), z.unknown()).optional()
57
+ },
58
+ produce({ addons, options }) {
59
+ const { extensions, ignores, imports, rules, settings } = addons;
60
+ const importLines = [
61
+ 'import eslint from "@eslint/js";',
62
+ 'import tseslint from "typescript-eslint";',
63
+ ...imports.map(
64
+ (packageImport) => `import ${packageImport.specifier} from "${packageImport.source}"`
65
+ )
66
+ ].sort(
67
+ (a, b) => a.replace(/.+from/, "").localeCompare(b.replace(/.+from/, ""))
68
+ );
69
+ const ignoreLines = ["lib", "node_modules", "pnpm-lock.yaml", ...ignores].map((ignore) => JSON.stringify(ignore)).sort();
70
+ const extensionLines = [
71
+ printExtension({
72
+ extends: [
73
+ "tseslint.configs.strictTypeChecked",
74
+ "tseslint.configs.stylisticTypeChecked"
75
+ ],
76
+ files: ["**/*.js", "**/*.ts"],
77
+ languageOptions: {
78
+ parserOptions: {
79
+ projectService: {
80
+ allowDefaultProject: ["*.config.*s"]
81
+ },
82
+ tsconfigRootDir: "import.meta.dirname"
83
+ }
84
+ },
85
+ ...rules && { rules },
86
+ ...settings && { settings }
87
+ }),
88
+ ...extensions.map(
89
+ (extension) => typeof extension === "string" ? extension : printExtension(extension)
90
+ )
91
+ ].sort((a, b) => processForSort(a).localeCompare(processForSort(b))).map((t) => t);
92
+ return {
93
+ addons: [
94
+ blockCSpell({
95
+ words: ["tseslint"]
96
+ }),
97
+ blockDevelopmentDocs({
98
+ sections: {
99
+ Linting: {
100
+ contents: {
101
+ after: [
102
+ `
103
+ For example, ESLint can be run with \`--fix\` to auto-fix some lint rule complaints:
104
+
105
+ \`\`\`shell
106
+ pnpm run lint --fix
107
+ \`\`\`
108
+ `,
109
+ ...addons.beforeLint ? [addons.beforeLint] : []
110
+ ],
111
+ before: `
112
+ This package includes several forms of linting to enforce consistent code quality and styling.
113
+ Each should be shown in VS Code, and can be run manually on the command-line:
114
+ `,
115
+ items: [
116
+ `- \`pnpm lint\` ([ESLint](https://eslint.org) with [typescript-eslint](https://typescript-eslint.io)): Lints JavaScript and TypeScript source files`
117
+ ],
118
+ plural: `Read the individual documentation for each linter to understand how it can be configured and used best.`
119
+ }
120
+ }
121
+ }
122
+ }),
123
+ blockGitHubActionsCI({
124
+ jobs: [
125
+ {
126
+ name: "Lint",
127
+ steps: [
128
+ ...options.bin ? [{ run: "pnpm build" }] : [],
129
+ { run: "pnpm lint" }
130
+ ]
131
+ }
132
+ ]
133
+ }),
134
+ blockPackageJson({
135
+ properties: {
136
+ devDependencies: getPackageDependencies(
137
+ "@eslint/js",
138
+ "@types/node",
139
+ "eslint",
140
+ "typescript-eslint",
141
+ ...imports.flatMap(({ source, types }) => {
142
+ const { name } = parsePackageName(source);
143
+ return types ? [name, `@types/${name}`] : [name];
144
+ })
145
+ ),
146
+ scripts: {
147
+ lint: "eslint . --max-warnings 0"
148
+ }
149
+ }
150
+ }),
151
+ blockVSCode({
152
+ extensions: ["dbaeumer.vscode-eslint"],
153
+ settings: {
154
+ "editor.codeActionsOnSave": {
155
+ "source.fixAll.eslint": "explicit"
156
+ },
157
+ "eslint.probe": [
158
+ "javascript",
159
+ "javascriptreact",
160
+ "json",
161
+ "jsonc",
162
+ "markdown",
163
+ "typescript",
164
+ "typescriptreact",
165
+ "yaml"
166
+ ],
167
+ "eslint.rules.customizations": [{ rule: "*", severity: "warn" }]
168
+ }
169
+ })
170
+ ],
171
+ files: {
172
+ "eslint.config.js": `${importLines.join("\n")}
173
+
174
+ export default tseslint.config(
175
+ { ignores: [${ignoreLines.join(", ")}] },
176
+ ${printExtension({
177
+ linterOptions: { reportUnusedDisableDirectives: "error" }
178
+ })},
179
+ eslint.configs.recommended,
180
+ ${extensionLines.join(",")}
181
+ );`
182
+ }
183
+ };
184
+ }
185
+ });
186
+ function printExtension(extension) {
187
+ return [
188
+ "{",
189
+ extension.extends && `extends: [${extension.extends.join(", ")}],`,
190
+ extension.files && `files: [${extension.files.map((glob) => JSON.stringify(glob)).join(", ")}],`,
191
+ extension.languageOptions && `languageOptions: ${JSON.stringify(extension.languageOptions).replace('"import.meta.dirname"', "import.meta.dirname")},`,
192
+ extension.linterOptions && `linterOptions: ${JSON.stringify(extension.linterOptions)}`,
193
+ extension.rules && `rules: ${printExtensionRules(extension.rules)},`,
194
+ extension.settings && `settings: ${JSON.stringify(extension.settings)},`,
195
+ "}"
196
+ ].filter(Boolean).join(" ");
197
+ }
198
+ function printExtensionRules(rules) {
199
+ if (!Array.isArray(rules)) {
200
+ return JSON.stringify(rules);
201
+ }
202
+ return [
203
+ "{",
204
+ ...rules.flatMap((group) => [
205
+ group.comment ? `// ${group.comment}
206
+ ` : "",
207
+ ...Object.entries(group.entries).map(
208
+ ([ruleName, options]) => `"${ruleName}": ${JSON.stringify(options)},`
209
+ )
210
+ ]),
211
+ "}"
212
+ ].join("");
213
+ }
214
+ function processForSort(line) {
215
+ if (line.startsWith("...") || /\w+/.test(line[0])) {
216
+ return `A
217
+ ${line.replaceAll(/\W+/g, "")}`;
218
+ }
219
+ return `B
220
+ ${(/files: (.+)/.exec(line)?.[1] ?? line).replaceAll(/\W+/g, "")}`;
221
+ }
222
+ export {
223
+ blockESLint
224
+ };
225
+ //# sourceMappingURL=blockESLint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/next/blocks/blockESLint.ts"],"sourcesContent":["// @ts-expect-error -- https://github.com/egoist/parse-package-name/issues/30\nimport { parse as parsePackageName } from \"parse-package-name\";\nimport { z } from \"zod\";\n\nimport { base } from \"../base.js\";\nimport { blockCSpell } from \"./blockCSpell.js\";\nimport { blockDevelopmentDocs } from \"./blockDevelopmentDocs.js\";\nimport { blockGitHubActionsCI } from \"./blockGitHubActionsCI.js\";\nimport { blockPackageJson } from \"./blockPackageJson.js\";\nimport { blockVSCode } from \"./blockVSCode.js\";\nimport { getPackageDependencies } from \"./packageData.js\";\n\nconst zRuleOptions = z.union([\n\tz.literal(\"error\"),\n\tz.literal(\"off\"),\n\tz.literal(\"warn\"),\n\tz.union([\n\t\tz.tuple([z.union([z.literal(\"error\"), z.literal(\"warn\")]), z.unknown()]),\n\t\tz.tuple([\n\t\t\tz.union([z.literal(\"error\"), z.literal(\"warn\")]),\n\t\t\tz.unknown(),\n\t\t\tz.unknown(),\n\t\t]),\n\t]),\n]);\n\nconst zExtensionRules = z.union([\n\tz.record(z.string(), zRuleOptions),\n\tz.array(\n\t\tz.object({\n\t\t\tcomment: z.string().optional(),\n\t\t\tentries: z.record(z.string(), zRuleOptions),\n\t\t}),\n\t),\n]);\n\nconst zExtension = z.object({\n\textends: z.array(z.string()).optional(),\n\tfiles: z.array(z.string()).optional(),\n\tlanguageOptions: z.unknown().optional(),\n\tlinterOptions: z.unknown().optional(),\n\tplugins: z.record(z.string(), z.string()).optional(),\n\trules: zExtensionRules.optional(),\n\tsettings: z.record(z.string(), z.unknown()).optional(),\n});\n\nconst zPackageImport = z.object({\n\tsource: z.string(),\n\tspecifier: z.string(),\n\ttypes: z.boolean().optional(),\n});\n\nexport const blockESLint = base.createBlock({\n\tabout: {\n\t\tname: \"ESLint\",\n\t},\n\taddons: {\n\t\tbeforeLint: z.string().optional(),\n\t\textensions: z.array(z.union([z.string(), zExtension])).default([]),\n\t\tignores: z.array(z.string()).default([]),\n\t\timports: z.array(zPackageImport).default([]),\n\t\trules: zExtensionRules.optional(),\n\t\tsettings: z.record(z.string(), z.unknown()).optional(),\n\t},\n\tproduce({ addons, options }) {\n\t\tconst { extensions, ignores, imports, rules, settings } = addons;\n\n\t\tconst importLines = [\n\t\t\t'import eslint from \"@eslint/js\";',\n\t\t\t'import tseslint from \"typescript-eslint\";',\n\t\t\t...imports.map(\n\t\t\t\t(packageImport) =>\n\t\t\t\t\t`import ${packageImport.specifier} from \"${packageImport.source}\"`,\n\t\t\t),\n\t\t].sort((a, b) =>\n\t\t\ta.replace(/.+from/, \"\").localeCompare(b.replace(/.+from/, \"\")),\n\t\t);\n\n\t\tconst ignoreLines = [\"lib\", \"node_modules\", \"pnpm-lock.yaml\", ...ignores]\n\t\t\t.map((ignore) => JSON.stringify(ignore))\n\t\t\t.sort();\n\n\t\tconst extensionLines = [\n\t\t\tprintExtension({\n\t\t\t\textends: [\n\t\t\t\t\t\"tseslint.configs.strictTypeChecked\",\n\t\t\t\t\t\"tseslint.configs.stylisticTypeChecked\",\n\t\t\t\t],\n\t\t\t\tfiles: [\"**/*.js\", \"**/*.ts\"],\n\t\t\t\tlanguageOptions: {\n\t\t\t\t\tparserOptions: {\n\t\t\t\t\t\tprojectService: {\n\t\t\t\t\t\t\tallowDefaultProject: [\"*.config.*s\"],\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttsconfigRootDir: \"import.meta.dirname\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t...(rules && { rules }),\n\t\t\t\t...(settings && { settings }),\n\t\t\t}),\n\t\t\t...extensions.map((extension) =>\n\t\t\t\ttypeof extension === \"string\" ? extension : printExtension(extension),\n\t\t\t),\n\t\t]\n\t\t\t.sort((a, b) => processForSort(a).localeCompare(processForSort(b)))\n\t\t\t.map((t) => t);\n\n\t\treturn {\n\t\t\taddons: [\n\t\t\t\tblockCSpell({\n\t\t\t\t\twords: [\"tseslint\"],\n\t\t\t\t}),\n\t\t\t\tblockDevelopmentDocs({\n\t\t\t\t\tsections: {\n\t\t\t\t\t\tLinting: {\n\t\t\t\t\t\t\tcontents: {\n\t\t\t\t\t\t\t\tafter: [\n\t\t\t\t\t\t\t\t\t`\nFor example, ESLint can be run with \\`--fix\\` to auto-fix some lint rule complaints:\n\n\\`\\`\\`shell\npnpm run lint --fix\n\\`\\`\\`\n`,\n\t\t\t\t\t\t\t\t\t...(addons.beforeLint ? [addons.beforeLint] : []),\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\tbefore: `\nThis package includes several forms of linting to enforce consistent code quality and styling.\nEach should be shown in VS Code, and can be run manually on the command-line:\n`,\n\t\t\t\t\t\t\t\titems: [\n\t\t\t\t\t\t\t\t\t`- \\`pnpm lint\\` ([ESLint](https://eslint.org) with [typescript-eslint](https://typescript-eslint.io)): Lints JavaScript and TypeScript source files`,\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\tplural: `Read the individual documentation for each linter to understand how it can be configured and used best.`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockGitHubActionsCI({\n\t\t\t\t\tjobs: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: \"Lint\",\n\t\t\t\t\t\t\tsteps: [\n\t\t\t\t\t\t\t\t...(options.bin ? [{ run: \"pnpm build\" }] : []),\n\t\t\t\t\t\t\t\t{ run: \"pnpm lint\" },\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}),\n\t\t\t\tblockPackageJson({\n\t\t\t\t\tproperties: {\n\t\t\t\t\t\tdevDependencies: getPackageDependencies(\n\t\t\t\t\t\t\t\"@eslint/js\",\n\t\t\t\t\t\t\t\"@types/node\",\n\t\t\t\t\t\t\t\"eslint\",\n\t\t\t\t\t\t\t\"typescript-eslint\",\n\t\t\t\t\t\t\t...imports.flatMap(({ source, types }) => {\n\t\t\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-call -- https://github.com/egoist/parse-package-name/issues/30\n\t\t\t\t\t\t\t\tconst { name } = parsePackageName(source) as { name: string };\n\t\t\t\t\t\t\t\treturn types ? [name, `@types/${name}`] : [name];\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tscripts: {\n\t\t\t\t\t\t\tlint: \"eslint . --max-warnings 0\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockVSCode({\n\t\t\t\t\textensions: [\"dbaeumer.vscode-eslint\"],\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\"editor.codeActionsOnSave\": {\n\t\t\t\t\t\t\t\"source.fixAll.eslint\": \"explicit\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"eslint.probe\": [\n\t\t\t\t\t\t\t\"javascript\",\n\t\t\t\t\t\t\t\"javascriptreact\",\n\t\t\t\t\t\t\t\"json\",\n\t\t\t\t\t\t\t\"jsonc\",\n\t\t\t\t\t\t\t\"markdown\",\n\t\t\t\t\t\t\t\"typescript\",\n\t\t\t\t\t\t\t\"typescriptreact\",\n\t\t\t\t\t\t\t\"yaml\",\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"eslint.rules.customizations\": [{ rule: \"*\", severity: \"warn\" }],\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t],\n\t\t\tfiles: {\n\t\t\t\t\"eslint.config.js\": `${importLines.join(\"\\n\")}\n\nexport default tseslint.config(\n\t{ ignores: [${ignoreLines.join(\", \")}] },\n\t${printExtension({\n\t\tlinterOptions: { reportUnusedDisableDirectives: \"error\" },\n\t})},\n\teslint.configs.recommended,\n\t${extensionLines.join(\",\")}\n);`,\n\t\t\t},\n\t\t};\n\t},\n});\n\nfunction printExtension(extension: z.infer<typeof zExtension>) {\n\treturn [\n\t\t\"{\",\n\t\textension.extends && `extends: [${extension.extends.join(\", \")}],`,\n\t\textension.files &&\n\t\t\t`files: [${extension.files.map((glob) => JSON.stringify(glob)).join(\", \")}],`,\n\t\textension.languageOptions &&\n\t\t\t`languageOptions: ${JSON.stringify(extension.languageOptions).replace('\"import.meta.dirname\"', \"import.meta.dirname\")},`,\n\t\textension.linterOptions &&\n\t\t\t`linterOptions: ${JSON.stringify(extension.linterOptions)}`,\n\t\textension.rules && `rules: ${printExtensionRules(extension.rules)},`,\n\t\textension.settings && `settings: ${JSON.stringify(extension.settings)},`,\n\t\t\"}\",\n\t]\n\t\t.filter(Boolean)\n\t\t.join(\" \");\n}\n\nfunction printExtensionRules(rules: z.infer<typeof zExtensionRules>) {\n\tif (!Array.isArray(rules)) {\n\t\treturn JSON.stringify(rules);\n\t}\n\n\treturn [\n\t\t\"{\",\n\t\t...rules.flatMap((group) => [\n\t\t\tgroup.comment ? `// ${group.comment}\\n` : \"\",\n\t\t\t...Object.entries(group.entries).map(\n\t\t\t\t([ruleName, options]) => `\"${ruleName}\": ${JSON.stringify(options)},`,\n\t\t\t),\n\t\t]),\n\t\t\"}\",\n\t].join(\"\");\n}\n\nfunction processForSort(line: string) {\n\tif (line.startsWith(\"...\") || /\\w+/.test(line[0])) {\n\t\treturn `A\\n${line.replaceAll(/\\W+/g, \"\")}`;\n\t}\n\n\treturn `B\\n${(/files: (.+)/.exec(line)?.[1] ?? line).replaceAll(/\\W+/g, \"\")}`;\n}\n"],"mappings":"AACA,SAAS,SAAS,wBAAwB;AAC1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