create-typescript-app 1.54.4 → 1.56.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/lib/shared/options/args.d.ts +1 -1
- package/lib/shared/options/args.js +1 -1
- package/lib/shared/options/args.js.map +1 -1
- package/lib/shared/options/augmentOptionsWithExcludes.js +1 -1
- package/lib/shared/options/augmentOptionsWithExcludes.js.map +1 -1
- package/lib/shared/options/getBase.js +0 -1
- package/lib/shared/options/getBase.js.map +1 -1
- package/lib/steps/clearUnnecessaryFiles.js +2 -0
- package/lib/steps/clearUnnecessaryFiles.js.map +1 -1
- package/lib/steps/finalizeDependencies.js +3 -2
- package/lib/steps/finalizeDependencies.js.map +1 -1
- package/lib/steps/initializeGitHubRepository/initializeBranchProtectionSettings.js +0 -1
- package/lib/steps/initializeGitHubRepository/initializeBranchProtectionSettings.js.map +1 -1
- package/lib/steps/writing/creation/createESLintRC.js +12 -0
- package/lib/steps/writing/creation/createESLintRC.js.map +1 -1
- package/lib/steps/writing/creation/dotGitHub/createDevelopment/index.js +0 -1
- package/lib/steps/writing/creation/dotGitHub/createDevelopment/index.js.map +1 -1
- package/lib/steps/writing/creation/dotGitHub/createWorkflows.d.ts +0 -1
- package/lib/steps/writing/creation/dotGitHub/createWorkflows.js +0 -6
- package/lib/steps/writing/creation/dotGitHub/createWorkflows.js.map +1 -1
- package/lib/steps/writing/creation/dotGitHub/index.d.ts +0 -1
- package/lib/steps/writing/creation/rootFiles.d.ts +0 -2
- package/lib/steps/writing/creation/rootFiles.js +0 -11
- package/lib/steps/writing/creation/rootFiles.js.map +1 -1
- package/lib/steps/writing/creation/writePackageJson.js +0 -3
- package/lib/steps/writing/creation/writePackageJson.js.map +1 -1
- package/package.json +5 -10
- package/lib/steps/writing/creation/createDotESLintignore.d.ts +0 -7
- package/lib/steps/writing/creation/createDotESLintignore.js +0 -16
- package/lib/steps/writing/creation/createDotESLintignore.js.map +0 -1
|
@@ -90,7 +90,7 @@ declare const allArgOptions: {
|
|
|
90
90
|
readonly type: "boolean";
|
|
91
91
|
};
|
|
92
92
|
readonly "exclude-lint-package-json": {
|
|
93
|
-
readonly description: "Don't add
|
|
93
|
+
readonly description: "Don't add eslint-plugin-package-json to lint for \n package.json correctness.";
|
|
94
94
|
readonly docsSection: "opt-out";
|
|
95
95
|
readonly type: "boolean";
|
|
96
96
|
};
|
|
@@ -118,7 +118,7 @@ const allArgOptions = {
|
|
|
118
118
|
type: "boolean"
|
|
119
119
|
},
|
|
120
120
|
"exclude-lint-package-json": {
|
|
121
|
-
description: `Don't add
|
|
121
|
+
description: `Don't add eslint-plugin-package-json to lint for
|
|
122
122
|
package.json correctness.`,
|
|
123
123
|
docsSection: "opt-out",
|
|
124
124
|
type: "boolean"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/shared/options/args.ts"],"sourcesContent":["import chalk from \"chalk\";\n\nexport const allArgOptions = {\n\taccess: {\n\t\tdescription: `(${chalk.cyanBright(\n\t\t\t'\"public\" | \"restricted\"',\n\t\t)}): Which ${chalk.cyanBright(\"npm publish --access\")} to \n release npm packages with (by default, \"public\")`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tauthor: {\n\t\tdescription: `Username on npm to publish packages under (by \n default, an existing npm author, or the currently logged in npm user, or \n ${chalk.cyanBright(\"owner.toLowerCase()\")})`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tauto: {\n\t\tdescription: `Whether to infer all options from files on disk.`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"boolean\",\n\t},\n\tbase: {\n\t\tdescription: `Whether to scaffold the repository with:\n • everything: that comes with the template (${chalk.cyanBright.bold(\n\t\t\"recommended\",\n\t)})\n • minimum: amounts of tooling, essentially opting out of everything\n • prompt: for which portions to exclude`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\tbin: {\n\t\tdescription: `package.json bin value to include for npx-style running.`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"create-repository\": {\n\t\tdescription: `Whether to create a corresponding repository on github.com \n (if it doesn't yet exist)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"boolean\",\n\t},\n\tdescription: {\n\t\tdescription: `Sentence case description of the repository \n (e.g. A quickstart-friendly TypeScript package with lots of great \n repository tooling. ✨)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\tdirectory: {\n\t\tdescription: `Directory to create the repository in (by default, the same \n name as the repository)`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\temail: {\n\t\tdescription: `Email address to be listed as the point of contact in docs \n and packages (e.g. example@joshuakgoldberg.com)`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"email-github\": {\n\t\tdescription: `Optionally, may be provided to use different emails in ${chalk.cyanBright(\n\t\t\t\".md\",\n\t\t)} \n files`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"email-npm\": {\n\t\tdescription: `Optionally, may be provided to use different emails in \n ${chalk.cyanBright(\"package.json\")}`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"exclude-all-contributors\": {\n\t\tdescription: `Don't add all-contributors to track contributions \n and display them in a README.md table.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-compliance\": {\n\t\tdescription: `Don't add a GitHub Actions workflow to verify that PRs match \n an expected format.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-deprecation\": {\n\t\tdescription: `Don't use eslint-plugin-deprecation to report on usage \n of code marked as ${chalk.cyanBright(\"@deprecated\")}.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-jsdoc\": {\n\t\tdescription: `Don't use eslint-plugin-jsdoc to enforce good practices around \n JSDoc comments.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-json\": {\n\t\tdescription: `Don't apply linting and sorting to ${chalk.cyanBright(\n\t\t\t\"*.json\",\n\t\t)}, and \n ${chalk.cyanBright(\"*.jsonc\")} files.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-knip\": {\n\t\tdescription: `Don't add Knip to detect unused files, dependencies, and code \n exports.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-md\": {\n\t\tdescription: `Don't apply linting to ${chalk.cyanBright(\"*.md\")} files.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-package-json\": {\n\t\tdescription: `Don't add npm-package-json-lint to lint for \n package.json correctness.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-packages\": {\n\t\tdescription: `Don't add a pnpm dedupe workflow to ensure packages \n aren't duplicated unnecessarily.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-perfectionist\": {\n\t\tdescription: `Don't apply eslint-plugin-perfectionist to ensure \n imports, keys, and so on are in sorted order.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-regex\": {\n\t\tdescription: `Don't add eslint-plugin-regex to enforce good practices around \n regular expressions.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-spelling\": {\n\t\tdescription: `Don't add cspell to spell check against dictionaries \n of known words.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-strict\": {\n\t\tdescription: `Don't augment the recommended logical lint rules with \n typescript-eslint's strict config.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-stylistic\": {\n\t\tdescription: `Don't add stylistic rules such as typescript-eslint's \n stylistic config.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-yml\": {\n\t\tdescription: `Don't apply linting and sorting to ${chalk.cyanBright(\n\t\t\t\"*.yaml\",\n\t\t)} and ${chalk.cyanBright(\"*.yml\")} files.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-releases\": {\n\t\tdescription: `Don't add release-it to generate changelogs, package bumps, \n and publishes based on conventional commits.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-renovate\": {\n\t\tdescription: `Don't add a Renovate config to dependencies up-to-date with \n PRs.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-tests\": {\n\t\tdescription: `Don't add Vitest tooling for fast unit tests, configured \n with coverage tracking.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\tfunding: {\n\t\tdescription: `GitHub organization or username to mention in ${chalk.cyanBright(\n\t\t\t\"funding.yml\",\n\t\t)} \n (by default, owner)`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tguide: {\n\t\tdescription: `Link to a contribution guide to place at the top of the \n development docs`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"guide-title\": {\n\t\tdescription: `If ${chalk.cyanBright(\n\t\t\t\"--guide\",\n\t\t)} is provided or detected from an existing \n DEVELOPMENT.md, the text title to place in the guide link`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tkeywords: {\n\t\tdescription: `Any number of keywords to include in ${chalk.cyanBright(\n\t\t\t\"package.json\",\n\t\t)} (by default, \n none). This can be specified any number of times, like \n ${chalk.cyanBright('--keywords apple --keywords \"banana cherry\"')}`,\n\t\tdocsSection: \"optional\",\n\t\tmultiple: true,\n\t\ttype: \"string\",\n\t},\n\tlogo: {\n\t\tdescription: `Local image file in the repository to display near the top of \n the README.md as a logo`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"logo-alt\": {\n\t\tdescription: `If ${chalk.cyanBright(\n\t\t\t\"--logo\",\n\t\t)} is provided or detected from an existing README.md, \n alt text that describes the image will be prompted for if not provided`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tmode: {\n\t\tdescription: `Whether to:\n • create: a new repository in a child directory\n • initialize: a freshly repository in the current directory\n • migrate: an existing repository in the current directory`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\toffline: {\n\t\tdescription: `You can run ${chalk.cyanBright(\n\t\t\t\"create-typescript-app\",\n\t\t)} in an \"offline\" mode. \n Doing so will:\n • Enable ${chalk.cyanBright(\n\t\t\"--exclude-all-contributors-api\",\n\t)} and ${chalk.cyanBright(\"--skip-github-api\")}\n • Skip network calls when setting up contributors\n • Run pnpm commands with pnpm's ${chalk.cyanBright(\"--offline\")} mode`,\n\t\tdocsSection: \"offline\",\n\t\ttype: \"boolean\",\n\t},\n\towner: {\n\t\tdescription: `GitHub organization or user the repository is underneath \n (e.g. JoshuaKGoldberg)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\t\"preserve-generated-form\": {\n\t\tdescription: `Whether to keep the GitHub repository generated from \n notice (by default, false)`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"boolean\",\n\t},\n\trepository: {\n\t\tdescription: `The kebab-case name of the repository \n (e.g. create-typescript-app)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\t\"skip-all-contributors-api\": {\n\t\tdescription: `Skips network calls that fetch all-contributors data from\n GitHub. This flag does nothing if ${chalk.cyanBright(\n\t\t\"--exclude-all-contributors\",\n\t)} was specified.`,\n\t\tdocsSection: \"skip-net\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-github-api\": {\n\t\tdescription: `Skips calling to GitHub APIs.`,\n\t\tdocsSection: \"skip-net\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-install\": {\n\t\tdescription: `Skips installing all the new template packages with pnpm.`,\n\t\tdocsSection: \"skip-net\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-removal\": {\n\t\tdescription: `Skips removing setup docs and scripts, including this ${chalk.cyanBright(\n\t\t\t\"docs/\",\n\t\t)} \n directory`,\n\t\tdocsSection: \"skip-disk\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-restore\": {\n\t\tdescription: `Skips the prompt offering to restore the repository if an \n error occurs during setup`,\n\t\tdocsSection: \"skip-disk\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-uninstall\": {\n\t\tdescription: `Skips uninstalling packages only used for setup scripts`,\n\t\tdocsSection: \"skip-disk\",\n\t\ttype: \"boolean\",\n\t},\n\ttitle: {\n\t\tdescription: `Title Case title for the repository to be used in \n documentation (e.g. Create TypeScript App)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n} as const;\n"],"mappings":"AAAA,OAAO,WAAW;AAEX,MAAM,gBAAgB;AAAA,EAC5B,QAAQ;AAAA,IACP,aAAa,IAAI,MAAM;AAAA,MACtB;AAAA,IACD,CAAC,YAAY,MAAM,WAAW,sBAAsB,CAAC;AAAA;AAAA,IAErD,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,QAAQ;AAAA,IACP,aAAa;AAAA;AAAA,IAEX,MAAM,WAAW,qBAAqB,CAAC;AAAA,IACzC,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,MAAM;AAAA,IACL,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,MAAM;AAAA,IACL,aAAa;AAAA,qDACiC,MAAM,WAAW;AAAA,MAC/D;AAAA,IACD,CAAC;AAAA;AAAA;AAAA,IAGA,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,K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Eb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,YAAY;AAAA,IACX,aAAa;AAAA;AAAA,IAEb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,6BAA6B;AAAA,IAC5B,aAAa;AAAA,sCACuB,MAAM;AAAA,MAC1C;AAAA,IACD,CAAC;AAAA,IACA,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,mBAAmB;AAAA,IAClB,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,gBAAgB;AAAA,IACf,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,gBAAgB;AAAA,IACf,aAAa,yDAAyD,MAAM;AAAA,MAC3E;AAAA,IACD,CAAC;AAAA;AAAA,IAED,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,gBAAgB;AAAA,IACf,aAAa;AAAA;AAAA,IAEb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,kBAAkB;AAAA,IACjB,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,OAAO;AAAA,IACN,aAAa;AAAA;AAAA,IAEb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AACD;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/shared/options/args.ts"],"sourcesContent":["import chalk from \"chalk\";\n\nexport const allArgOptions = {\n\taccess: {\n\t\tdescription: `(${chalk.cyanBright(\n\t\t\t'\"public\" | \"restricted\"',\n\t\t)}): Which ${chalk.cyanBright(\"npm publish --access\")} to \n release npm packages with (by default, \"public\")`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tauthor: {\n\t\tdescription: `Username on npm to publish packages under (by \n default, an existing npm author, or the currently logged in npm user, or \n ${chalk.cyanBright(\"owner.toLowerCase()\")})`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tauto: {\n\t\tdescription: `Whether to infer all options from files on disk.`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"boolean\",\n\t},\n\tbase: {\n\t\tdescription: `Whether to scaffold the repository with:\n • everything: that comes with the template (${chalk.cyanBright.bold(\n\t\t\"recommended\",\n\t)})\n • minimum: amounts of tooling, essentially opting out of everything\n • prompt: for which portions to exclude`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\tbin: {\n\t\tdescription: `package.json bin value to include for npx-style running.`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"create-repository\": {\n\t\tdescription: `Whether to create a corresponding repository on github.com \n (if it doesn't yet exist)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"boolean\",\n\t},\n\tdescription: {\n\t\tdescription: `Sentence case description of the repository \n (e.g. A quickstart-friendly TypeScript package with lots of great \n repository tooling. ✨)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\tdirectory: {\n\t\tdescription: `Directory to create the repository in (by default, the same \n name as the repository)`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\temail: {\n\t\tdescription: `Email address to be listed as the point of contact in docs \n and packages (e.g. example@joshuakgoldberg.com)`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"email-github\": {\n\t\tdescription: `Optionally, may be provided to use different emails in ${chalk.cyanBright(\n\t\t\t\".md\",\n\t\t)} \n files`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"email-npm\": {\n\t\tdescription: `Optionally, may be provided to use different emails in \n ${chalk.cyanBright(\"package.json\")}`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"exclude-all-contributors\": {\n\t\tdescription: `Don't add all-contributors to track contributions \n and display them in a README.md table.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-compliance\": {\n\t\tdescription: `Don't add a GitHub Actions workflow to verify that PRs match \n an expected format.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-deprecation\": {\n\t\tdescription: `Don't use eslint-plugin-deprecation to report on usage \n of code marked as ${chalk.cyanBright(\"@deprecated\")}.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-jsdoc\": {\n\t\tdescription: `Don't use eslint-plugin-jsdoc to enforce good practices around \n JSDoc comments.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-json\": {\n\t\tdescription: `Don't apply linting and sorting to ${chalk.cyanBright(\n\t\t\t\"*.json\",\n\t\t)}, and \n ${chalk.cyanBright(\"*.jsonc\")} files.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-knip\": {\n\t\tdescription: `Don't add Knip to detect unused files, dependencies, and code \n exports.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-md\": {\n\t\tdescription: `Don't apply linting to ${chalk.cyanBright(\"*.md\")} files.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-package-json\": {\n\t\tdescription: `Don't add eslint-plugin-package-json to lint for \n package.json correctness.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-packages\": {\n\t\tdescription: `Don't add a pnpm dedupe workflow to ensure packages \n aren't duplicated unnecessarily.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-perfectionist\": {\n\t\tdescription: `Don't apply eslint-plugin-perfectionist to ensure \n imports, keys, and so on are in sorted order.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-regex\": {\n\t\tdescription: `Don't add eslint-plugin-regex to enforce good practices around \n regular expressions.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-spelling\": {\n\t\tdescription: `Don't add cspell to spell check against dictionaries \n of known words.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-strict\": {\n\t\tdescription: `Don't augment the recommended logical lint rules with \n typescript-eslint's strict config.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-stylistic\": {\n\t\tdescription: `Don't add stylistic rules such as typescript-eslint's \n stylistic config.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-yml\": {\n\t\tdescription: `Don't apply linting and sorting to ${chalk.cyanBright(\n\t\t\t\"*.yaml\",\n\t\t)} and ${chalk.cyanBright(\"*.yml\")} files.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-releases\": {\n\t\tdescription: `Don't add release-it to generate changelogs, package bumps, \n and publishes based on conventional commits.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-renovate\": {\n\t\tdescription: `Don't add a Renovate config to dependencies up-to-date with \n PRs.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-tests\": {\n\t\tdescription: `Don't add Vitest tooling for fast unit tests, configured \n with coverage tracking.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\tfunding: {\n\t\tdescription: `GitHub organization or username to mention in ${chalk.cyanBright(\n\t\t\t\"funding.yml\",\n\t\t)} \n (by default, owner)`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tguide: {\n\t\tdescription: `Link to a contribution guide to place at the top of the \n development docs`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"guide-title\": {\n\t\tdescription: `If ${chalk.cyanBright(\n\t\t\t\"--guide\",\n\t\t)} is provided or detected from an existing \n DEVELOPMENT.md, the text title to place in the guide link`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tkeywords: {\n\t\tdescription: `Any number of keywords to include in ${chalk.cyanBright(\n\t\t\t\"package.json\",\n\t\t)} (by default, \n none). This can be specified any number of times, like \n ${chalk.cyanBright('--keywords apple --keywords \"banana cherry\"')}`,\n\t\tdocsSection: \"optional\",\n\t\tmultiple: true,\n\t\ttype: \"string\",\n\t},\n\tlogo: {\n\t\tdescription: `Local image file in the repository to display near the top of \n the README.md as a logo`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"logo-alt\": {\n\t\tdescription: `If ${chalk.cyanBright(\n\t\t\t\"--logo\",\n\t\t)} is provided or detected from an existing README.md, \n alt text that describes the image will be prompted for if not provided`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tmode: {\n\t\tdescription: `Whether to:\n • create: a new repository in a child directory\n • initialize: a freshly repository in the current directory\n • migrate: an existing repository in the current directory`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\toffline: {\n\t\tdescription: `You can run ${chalk.cyanBright(\n\t\t\t\"create-typescript-app\",\n\t\t)} in an \"offline\" mode. \n Doing so will:\n • Enable ${chalk.cyanBright(\n\t\t\"--exclude-all-contributors-api\",\n\t)} and ${chalk.cyanBright(\"--skip-github-api\")}\n • Skip network calls when setting up contributors\n • Run pnpm commands with pnpm's ${chalk.cyanBright(\"--offline\")} mode`,\n\t\tdocsSection: \"offline\",\n\t\ttype: \"boolean\",\n\t},\n\towner: {\n\t\tdescription: `GitHub organization or user the repository is underneath \n (e.g. JoshuaKGoldberg)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\t\"preserve-generated-form\": {\n\t\tdescription: `Whether to keep the GitHub repository generated from \n notice (by default, false)`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"boolean\",\n\t},\n\trepository: {\n\t\tdescription: `The kebab-case name of the repository \n (e.g. create-typescript-app)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\t\"skip-all-contributors-api\": {\n\t\tdescription: `Skips network calls that fetch all-contributors data from\n GitHub. This flag does nothing if ${chalk.cyanBright(\n\t\t\"--exclude-all-contributors\",\n\t)} was specified.`,\n\t\tdocsSection: \"skip-net\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-github-api\": {\n\t\tdescription: `Skips calling to GitHub APIs.`,\n\t\tdocsSection: \"skip-net\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-install\": {\n\t\tdescription: `Skips installing all the new template packages with pnpm.`,\n\t\tdocsSection: \"skip-net\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-removal\": {\n\t\tdescription: `Skips removing setup docs and scripts, including this ${chalk.cyanBright(\n\t\t\t\"docs/\",\n\t\t)} \n directory`,\n\t\tdocsSection: \"skip-disk\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-restore\": {\n\t\tdescription: `Skips the prompt offering to restore the repository if an \n error occurs during setup`,\n\t\tdocsSection: \"skip-disk\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-uninstall\": {\n\t\tdescription: `Skips uninstalling packages only used for setup scripts`,\n\t\tdocsSection: \"skip-disk\",\n\t\ttype: \"boolean\",\n\t},\n\ttitle: {\n\t\tdescription: `Title Case title for the repository to be used in \n documentation (e.g. Create TypeScript App)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n} as const;\n"],"mappings":"AAAA,OAAO,WAAW;AAEX,MAAM,gBAAgB;AAAA,EAC5B,QAAQ;AAAA,IACP,aAAa,IAAI,MAAM;AAAA,MACtB;AAAA,IACD,CAAC,YAAY,MAAM,WAAW,sBAAsB,CAAC;AAAA;AAAA,IAErD,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,QAAQ;AAAA,IACP,aAAa;AAAA;AA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hint: "--exclude-lint-package-json",
|
|
45
|
-
label: "Add
|
|
45
|
+
label: "Add eslint-plugin-package-json to lint for package.json correctness.",
|
|
46
46
|
uncommon: true
|
|
47
47
|
},
|
|
48
48
|
excludeLintPackages: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/shared/options/augmentOptionsWithExcludes.ts"],"sourcesContent":["import * as prompts from \"@clack/prompts\";\nimport chalk from \"chalk\";\n\nimport { filterPromptCancel } from \"../prompts.js\";\nimport { Options, OptionsBase } from \"../types.js\";\n\ninterface ExclusionDescription {\n\thint: string;\n\tlabel: string;\n\tuncommon?: true;\n}\n\nexport type ExclusionKey = keyof Options & `exclude${string}`;\n\nconst exclusionDescriptions: Record<ExclusionKey, ExclusionDescription> = {\n\texcludeAllContributors: {\n\t\thint: \"--exclude-all-contributors\",\n\t\tlabel:\n\t\t\t\"Add all-contributors to track contributions and display them in a README.md table.\",\n\t},\n\texcludeCompliance: {\n\t\thint: \"--exclude-compliance\",\n\t\tlabel:\n\t\t\t\"Add a GitHub Actions workflow to verify that PRs match an expected format.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintDeprecation: {\n\t\thint: \"--exclude-lint-deprecation\",\n\t\tlabel:\n\t\t\t\"Include an eslint-plugin-deprecation to reports on usage of code marked as @deprecated.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintESLint: {\n\t\thint: \"--exclude-lint-eslint\",\n\t\tlabel:\n\t\t\t\"Include eslint-plugin-eslint-comment to enforce good practices around ESLint comment directives.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintJSDoc: {\n\t\thint: \"--exclude-lint-jsdoc\",\n\t\tlabel:\n\t\t\t\"Include eslint-plugin-jsdoc to enforce good practices around JSDoc comments.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintJson: {\n\t\thint: \"--exclude-lint-json\",\n\t\tlabel: \"Apply linting and sorting to *.json and *.jsonc files.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintKnip: {\n\t\thint: \"--exclude-lint-knip\",\n\t\tlabel: \"Add Knip to detect unused files, dependencies, and code exports.\",\n\t},\n\texcludeLintMd: {\n\t\thint: \"--exclude-lint-md\",\n\t\tlabel: \"Apply linting to *.md files.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintPackageJson: {\n\t\thint: \"--exclude-lint-package-json\",\n\t\tlabel: \"Add npm-package-json-lint to lint for package.json correctness.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintPackages: {\n\t\thint: \"--exclude-lint-packages\",\n\t\tlabel:\n\t\t\t\"Add a pnpm dedupe workflow to ensure packages aren't duplicated unnecessarily.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintPerfectionist: {\n\t\thint: \"--exclude-lint-perfectionist\",\n\t\tlabel:\n\t\t\t\"Apply eslint-plugin-perfectionist to ensure imports, keys, and so on are in sorted order.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintRegex: {\n\t\thint: \"--exclude-lint-regex\",\n\t\tlabel:\n\t\t\t\"Include eslint-plugin-regex to enforce good practices around regular expressions.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintSpelling: {\n\t\thint: \"--exclude-lint-spelling\",\n\t\tlabel: \"Add cspell to spell check against dictionaries of known words.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintStrict: {\n\t\thint: \"--exclude-lint-strict\",\n\t\tlabel:\n\t\t\t\"Include strict logical lint rules such as typescript-eslint's strict config. \",\n\t\tuncommon: true,\n\t},\n\texcludeLintStylistic: {\n\t\thint: \"--exclude-lint-stylistic\",\n\t\tlabel:\n\t\t\t\"Include stylistic lint rules such as typescript-eslint's stylistic config.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintYml: {\n\t\thint: \"--exclude-lint-yml\",\n\t\tlabel: \"Apply linting and sorting to *.yaml and *.yml files.\",\n\t\tuncommon: true,\n\t},\n\texcludeReleases: {\n\t\thint: \"--exclude-releases\",\n\t\tlabel:\n\t\t\t\"Add release-it to generate changelogs, package bumps, and publishes based on conventional commits.\",\n\t},\n\texcludeRenovate: {\n\t\thint: \"--exclude-renovate\",\n\t\tlabel: \"Add a Renovate config to keep dependencies up-to-date with PRs.\",\n\t},\n\texcludeTests: {\n\t\thint: \"--exclude-tests\",\n\t\tlabel:\n\t\t\t\"Add Vitest tooling for fast unit tests, configured with coverage tracking.\",\n\t},\n};\n\nconst exclusionKeys = Object.keys(exclusionDescriptions) as ExclusionKey[];\n\nexport function getExclusions(\n\toptions: Partial<Options>,\n\tbase?: OptionsBase,\n): Partial<Options> {\n\tswitch (base) {\n\t\tcase \"common\":\n\t\t\treturn {\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\texclusionKeys\n\t\t\t\t\t\t.filter((exclusion) => exclusionDescriptions[exclusion].uncommon)\n\t\t\t\t\t\t.map((exclusion) => [exclusion, options[exclusion] ?? true]),\n\t\t\t\t),\n\t\t\t};\n\t\tcase \"minimum\":\n\t\t\treturn {\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\texclusionKeys.map((exclusion) => [\n\t\t\t\t\t\texclusion,\n\t\t\t\t\t\toptions[exclusion] ?? true,\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t};\n\t\t// We only really care about exclusions on the common and minimum bases\n\t\tdefault:\n\t\t\treturn {};\n\t}\n}\n\nexport async function augmentOptionsWithExcludes(\n\toptions: Options,\n): Promise<Options | undefined> {\n\tif (\n\t\tObject.keys(options).some(\n\t\t\t(key) =>\n\t\t\t\tkey in exclusionDescriptions &&\n\t\t\t\toptions[key as keyof typeof options] !== undefined,\n\t\t)\n\t) {\n\t\treturn options;\n\t}\n\n\tconst base =\n\t\toptions.base ??\n\t\tfilterPromptCancel<OptionsBase | symbol>(\n\t\t\tawait prompts.select({\n\t\t\t\tinitialValue: \"common\" as OptionsBase,\n\t\t\t\tmessage: `How much tooling would you like the template to set up for you?`,\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: makeLabel(\n\t\t\t\t\t\t\t\"everything\",\n\t\t\t\t\t\t\t\"The most comprehensive tooling imaginable: sorting, spellchecking, and more!\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue: \"everything\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\thint: \"recommended\",\n\t\t\t\t\t\tlabel: makeLabel(\n\t\t\t\t\t\t\t\"common\",\n\t\t\t\t\t\t\t\"Bare starters plus testing and automation for all-contributors and releases.\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue: \"common\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: makeLabel(\n\t\t\t\t\t\t\t\"minimum\",\n\t\t\t\t\t\t\t\"Just bare starter tooling: building, formatting, linting, and type checking.\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue: \"minimum\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: makeLabel(\"prompt\", \"(allow me to customize)\"),\n\t\t\t\t\t\tvalue: \"prompt\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t);\n\n\tswitch (base) {\n\t\tcase undefined:\n\t\t\treturn undefined;\n\t\tcase \"common\":\n\t\tcase \"minimum\":\n\t\tcase \"everything\":\n\t\t\treturn {\n\t\t\t\t...options,\n\t\t\t\t...getExclusions(options, base),\n\t\t\t};\n\t\tcase \"prompt\":\n\t\t\tconst exclusionsNotEnabled = new Set(\n\t\t\t\tfilterPromptCancel(\n\t\t\t\t\tawait prompts.multiselect({\n\t\t\t\t\t\tinitialValues: exclusionKeys,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t\"Select the tooling portions you'd like to remove. All are enabled by default. Press ↑ or ↓ to change the selected item, then space to select.\",\n\t\t\t\t\t\toptions: Object.entries(exclusionDescriptions).map(\n\t\t\t\t\t\t\t([value, { hint, label }]) => ({\n\t\t\t\t\t\t\t\thint,\n\t\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\t\tvalue: value as ExclusionKey,\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);\n\n\t\t\treturn {\n\t\t\t\t...options,\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\texclusionKeys.map(\n\t\t\t\t\t\t(exclusionKey) =>\n\t\t\t\t\t\t\t[exclusionKey, !exclusionsNotEnabled.has(exclusionKey)] as const,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t};\n\t}\n}\n\nfunction makeLabel(label: string, message: string) {\n\treturn [chalk.bold(label), message].join(\"\\t \");\n}\n"],"mappings":"AAAA,YAAY,aAAa;AACzB,OAAO,WAAW;AAElB,SAAS,0BAA0B;AAWnC,MAAM,wBAAoE;AAAA,EACzE,wBAAwB;AAAA,IACvB,MAAM;AAAA,IACN,OACC;AAAA,EACF;AAAA,EACA,mBAAmB;AAAA,IAClB,MAAM;AAAA,IACN,OACC;AAAA,IACD,UAAU;AAAA,EACX;AAAA,EACA,wBAAwB;AAAA,IACvB,MAAM;AAAA,IACN,OACC;AAAA,IACD,UAAU;AAAA,EACX;AAAA,EACA,mBAAmB;AAAA,IAClB,MAAM;AAAA,IACN,OACC;AAAA,IACD,UAAU;AAAA,EACX;AAAA,EACA,kBAAkB;AAAA,IACjB,MAAM;AAAA,IACN,OACC;AAAA,IACD,UAAU;AAAA,EACX;AAAA,EACA,iBAAiB;AAAA,IAChB,MAAM;AAAA,IACN,OAAO;AAAA,IACP,UAAU;AAAA,EACX;AAAA,EACA,iBAAiB;AAAA,IAChB,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACA,eAAe;AAAA,IACd,MAAM;AAAA,IACN,OAAO;AAAA,IACP,UAAU;AAAA,EACX;AAAA,EACA,wBAAwB;AAAA,IACvB,MAAM;AAAA,IACN,OAAO;AAAA,IACP,UAAU;AAAA,EACX;AAAA,EACA,qBAAqB;AAAA,IACpB,MAAM;AAAA,IACN,OACC;AAAA,IACD,UAAU;AAAA,EACX;AAAA,EACA,0BAA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AAC;AAAA,UACxD;AAAA,QACD;AAAA,MACD;AAAA,EACF;AACD;AAEA,SAAS,UAAU,OAAe,SAAiB;AAClD,SAAO,CAAC,MAAM,KAAK,KAAK,GAAG,OAAO,EAAE,KAAK,IAAK;AAC/C;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/shared/options/augmentOptionsWithExcludes.ts"],"sourcesContent":["import * as prompts from \"@clack/prompts\";\nimport chalk from \"chalk\";\n\nimport { filterPromptCancel } from \"../prompts.js\";\nimport { Options, OptionsBase } from \"../types.js\";\n\ninterface ExclusionDescription {\n\thint: string;\n\tlabel: string;\n\tuncommon?: true;\n}\n\nexport type ExclusionKey = keyof Options & `exclude${string}`;\n\nconst exclusionDescriptions: Record<ExclusionKey, ExclusionDescription> = {\n\texcludeAllContributors: {\n\t\thint: \"--exclude-all-contributors\",\n\t\tlabel:\n\t\t\t\"Add all-contributors to track contributions and display them in a README.md table.\",\n\t},\n\texcludeCompliance: {\n\t\thint: \"--exclude-compliance\",\n\t\tlabel:\n\t\t\t\"Add a GitHub Actions workflow to verify that PRs match an expected format.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintDeprecation: {\n\t\thint: \"--exclude-lint-deprecation\",\n\t\tlabel:\n\t\t\t\"Include an eslint-plugin-deprecation to reports on usage of code marked as @deprecated.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintESLint: {\n\t\thint: \"--exclude-lint-eslint\",\n\t\tlabel:\n\t\t\t\"Include eslint-plugin-eslint-comment to enforce good practices around ESLint comment directives.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintJSDoc: {\n\t\thint: \"--exclude-lint-jsdoc\",\n\t\tlabel:\n\t\t\t\"Include eslint-plugin-jsdoc to enforce good practices around JSDoc comments.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintJson: {\n\t\thint: \"--exclude-lint-json\",\n\t\tlabel: \"Apply linting and sorting to *.json and *.jsonc files.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintKnip: {\n\t\thint: \"--exclude-lint-knip\",\n\t\tlabel: \"Add Knip to detect unused files, dependencies, and code exports.\",\n\t},\n\texcludeLintMd: {\n\t\thint: \"--exclude-lint-md\",\n\t\tlabel: \"Apply linting to *.md files.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintPackageJson: {\n\t\thint: \"--exclude-lint-package-json\",\n\t\tlabel:\n\t\t\t\"Add eslint-plugin-package-json to lint for package.json correctness.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintPackages: {\n\t\thint: \"--exclude-lint-packages\",\n\t\tlabel:\n\t\t\t\"Add a pnpm dedupe workflow to ensure packages aren't duplicated unnecessarily.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintPerfectionist: {\n\t\thint: \"--exclude-lint-perfectionist\",\n\t\tlabel:\n\t\t\t\"Apply eslint-plugin-perfectionist to ensure imports, keys, and so on are in sorted order.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintRegex: {\n\t\thint: \"--exclude-lint-regex\",\n\t\tlabel:\n\t\t\t\"Include eslint-plugin-regex to enforce good practices around regular expressions.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintSpelling: {\n\t\thint: \"--exclude-lint-spelling\",\n\t\tlabel: \"Add cspell to spell check against dictionaries of known words.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintStrict: {\n\t\thint: \"--exclude-lint-strict\",\n\t\tlabel:\n\t\t\t\"Include strict logical lint rules such as typescript-eslint's strict config. \",\n\t\tuncommon: true,\n\t},\n\texcludeLintStylistic: {\n\t\thint: \"--exclude-lint-stylistic\",\n\t\tlabel:\n\t\t\t\"Include stylistic lint rules such as typescript-eslint's stylistic config.\",\n\t\tuncommon: true,\n\t},\n\texcludeLintYml: {\n\t\thint: \"--exclude-lint-yml\",\n\t\tlabel: \"Apply linting and sorting to *.yaml and *.yml files.\",\n\t\tuncommon: true,\n\t},\n\texcludeReleases: {\n\t\thint: \"--exclude-releases\",\n\t\tlabel:\n\t\t\t\"Add release-it to generate changelogs, package bumps, and publishes based on conventional commits.\",\n\t},\n\texcludeRenovate: {\n\t\thint: \"--exclude-renovate\",\n\t\tlabel: \"Add a Renovate config to keep dependencies up-to-date with PRs.\",\n\t},\n\texcludeTests: {\n\t\thint: \"--exclude-tests\",\n\t\tlabel:\n\t\t\t\"Add Vitest tooling for fast unit tests, configured with coverage tracking.\",\n\t},\n};\n\nconst exclusionKeys = Object.keys(exclusionDescriptions) as ExclusionKey[];\n\nexport function getExclusions(\n\toptions: Partial<Options>,\n\tbase?: OptionsBase,\n): Partial<Options> {\n\tswitch (base) {\n\t\tcase \"common\":\n\t\t\treturn {\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\texclusionKeys\n\t\t\t\t\t\t.filter((exclusion) => exclusionDescriptions[exclusion].uncommon)\n\t\t\t\t\t\t.map((exclusion) => [exclusion, options[exclusion] ?? true]),\n\t\t\t\t),\n\t\t\t};\n\t\tcase \"minimum\":\n\t\t\treturn {\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\texclusionKeys.map((exclusion) => [\n\t\t\t\t\t\texclusion,\n\t\t\t\t\t\toptions[exclusion] ?? true,\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t};\n\t\t// We only really care about exclusions on the common and minimum bases\n\t\tdefault:\n\t\t\treturn {};\n\t}\n}\n\nexport async function augmentOptionsWithExcludes(\n\toptions: Options,\n): Promise<Options | undefined> {\n\tif (\n\t\tObject.keys(options).some(\n\t\t\t(key) =>\n\t\t\t\tkey in exclusionDescriptions &&\n\t\t\t\toptions[key as keyof typeof options] !== undefined,\n\t\t)\n\t) {\n\t\treturn options;\n\t}\n\n\tconst base =\n\t\toptions.base ??\n\t\tfilterPromptCancel<OptionsBase | symbol>(\n\t\t\tawait prompts.select({\n\t\t\t\tinitialValue: \"common\" as OptionsBase,\n\t\t\t\tmessage: `How much tooling would you like the template to set up for you?`,\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: makeLabel(\n\t\t\t\t\t\t\t\"everything\",\n\t\t\t\t\t\t\t\"The most comprehensive tooling imaginable: sorting, spellchecking, and more!\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue: \"everything\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\thint: \"recommended\",\n\t\t\t\t\t\tlabel: makeLabel(\n\t\t\t\t\t\t\t\"common\",\n\t\t\t\t\t\t\t\"Bare starters plus testing and automation for all-contributors and releases.\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue: \"common\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: makeLabel(\n\t\t\t\t\t\t\t\"minimum\",\n\t\t\t\t\t\t\t\"Just bare starter tooling: building, formatting, linting, and type checking.\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue: \"minimum\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: makeLabel(\"prompt\", \"(allow me to customize)\"),\n\t\t\t\t\t\tvalue: \"prompt\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t);\n\n\tswitch (base) {\n\t\tcase undefined:\n\t\t\treturn undefined;\n\t\tcase \"common\":\n\t\tcase \"minimum\":\n\t\tcase \"everything\":\n\t\t\treturn {\n\t\t\t\t...options,\n\t\t\t\t...getExclusions(options, base),\n\t\t\t};\n\t\tcase \"prompt\":\n\t\t\tconst exclusionsNotEnabled = new Set(\n\t\t\t\tfilterPromptCancel(\n\t\t\t\t\tawait prompts.multiselect({\n\t\t\t\t\t\tinitialValues: exclusionKeys,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t\"Select the tooling portions you'd like to remove. All are enabled by default. Press ↑ or ↓ to change the selected item, then space to select.\",\n\t\t\t\t\t\toptions: Object.entries(exclusionDescriptions).map(\n\t\t\t\t\t\t\t([value, { hint, label }]) => ({\n\t\t\t\t\t\t\t\thint,\n\t\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\t\tvalue: value as ExclusionKey,\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);\n\n\t\t\treturn {\n\t\t\t\t...options,\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\texclusionKeys.map(\n\t\t\t\t\t\t(exclusionKey) =>\n\t\t\t\t\t\t\t[exclusionKey, !exclusionsNotEnabled.has(exclusionKey)] as const,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t};\n\t}\n}\n\nfunction makeLabel(label: string, message: string) {\n\treturn [chalk.bold(label), message].join(\"\\t \");\n}\n"],"mappings":"AAAA,YAAY,aAAa;AACzB,OAAO,WAAW;AAElB,SAAS,0BAA0B;AAWnC,MAAM,wBAAoE;AAAA,EACzE,wBAAwB;AAAA,IACvB,MAAM;AAAA,IACN,OACC;AAAA,EACF;AAAA,EACA,mBAAmB;AAAA,IAClB,MAAM;AAAA,IACN,OACC;AAAA,IACD,UAAU;AAAA,EACX;AAAA,EACA,wBAAwB;AAAA,IACvB,MAAM;AAAA,IACN,OACC;AAAA,IACD,UAAU;AAAA,EACX;AAAA,EACA,mBAAmB;AAAA,IAClB,MAAM;AAAA,IACN,OACC;AAAA,IACD,UAAU;AAAA,EACX;AAAA,EACA,kBAAkB;AAAA,IACjB,MAAM;AAAA,IACN,OACC;AAAA,IACD,UAAU;AAAA,EACX;AAAA,EACA,iBAAiB;AAAA,IAChB,MAAM;AAAA,IACN,OAAO;AAAA,IACP,UAAU;AAAA,EACX;AAAA,EACA,iBAAiB;AAAA,IAChB,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACA,eAAe;AAAA,IACd,MAAM;AAAA,IACN,OAAO;AAAA,IACP,UAAU;AAAA,EACX;AAAA,EACA,wBAAwB;AAAA,IACvB,MAAM;AAAA,IACN,OACC;AAAA,IACD,UAAU;AAAA,EACX;AAAA,EACA,qBAAqB;AAAA,IACpB,MAAM;AAAA,IACN,OACC;AAAA,IACD,UAAU;AAAA,EACX;AAAA,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I,YAAY,CAAC;AAAA,UACxD;AAAA,QACD;AAAA,MACD;AAAA,EACF;AACD;AAEA,SAAS,UAAU,OAAe,SAAiB;AAClD,SAAO,CAAC,MAAM,KAAK,KAAK,GAAG,OAAO,EAAE,KAAK,IAAK;AAC/C;","names":[]}
|
|
@@ -2,7 +2,6 @@ import { readPackageData } from "../packages.js";
|
|
|
2
2
|
const commonScripts = /* @__PURE__ */ new Set(["lint:knip", "should-semantic-release", "test"]);
|
|
3
3
|
const everythingScripts = /* @__PURE__ */ new Set([
|
|
4
4
|
"lint:md",
|
|
5
|
-
"lint:package-json",
|
|
6
5
|
"lint:packages",
|
|
7
6
|
"lint:spelling"
|
|
8
7
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/shared/options/getBase.ts"],"sourcesContent":["import { readPackageData } from \"../packages.js\";\nimport { OptionsBase } from \"../types.js\";\n\nconst commonScripts = new Set([\"lint:knip\", \"should-semantic-release\", \"test\"]);\n\nconst everythingScripts = new Set([\n\t\"lint:md\",\n\t\"lint:
|
|
1
|
+
{"version":3,"sources":["../../../src/shared/options/getBase.ts"],"sourcesContent":["import { readPackageData } from \"../packages.js\";\nimport { OptionsBase } from \"../types.js\";\n\nconst commonScripts = new Set([\"lint:knip\", \"should-semantic-release\", \"test\"]);\n\nconst everythingScripts = new Set([\n\t\"lint:md\",\n\t\"lint:packages\",\n\t\"lint:spelling\",\n]);\n\nexport async function getBase(): Promise<OptionsBase> {\n\tconst scripts = Object.keys((await readPackageData()).scripts ?? {});\n\n\tif (\n\t\tscripts.reduce(\n\t\t\t(acc, curr) => (everythingScripts.has(curr) ? acc + 1 : acc),\n\t\t\t0,\n\t\t) >= 3\n\t) {\n\t\treturn \"everything\";\n\t}\n\n\tif (\n\t\tscripts.reduce(\n\t\t\t(acc, curr) => (commonScripts.has(curr) ? acc + 1 : acc),\n\t\t\t0,\n\t\t) >= 2\n\t) {\n\t\treturn \"common\";\n\t}\n\n\treturn \"minimum\";\n}\n"],"mappings":"AAAA,SAAS,uBAAuB;AAGhC,MAAM,gBAAgB,oBAAI,IAAI,CAAC,aAAa,2BAA2B,MAAM,CAAC;AAE9E,MAAM,oBAAoB,oBAAI,IAAI;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AACD,CAAC;AAED,eAAsB,UAAgC;AACrD,QAAM,UAAU,OAAO,MAAM,MAAM,gBAAgB,GAAG,WAAW,CAAC,CAAC;AAEnE,MACC,QAAQ;AAAA,IACP,CAAC,KAAK,SAAU,kBAAkB,IAAI,IAAI,IAAI,MAAM,IAAI;AAAA,IACxD;AAAA,EACD,KAAK,GACJ;AACD,WAAO;AAAA,EACR;AAEA,MACC,QAAQ;AAAA,IACP,CAAC,KAAK,SAAU,cAAc,IAAI,IAAI,IAAI,MAAM,IAAI;AAAA,IACpD;AAAA,EACD,KAAK,GACJ;AACD,WAAO;AAAA,EACR;AAEA,SAAO;AACR;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/steps/clearUnnecessaryFiles.ts"],"sourcesContent":["import * as fs from \"node:fs/promises\";\n\nconst globPaths = [\n\t...extensions(\".babelrc\", \"cjs\", \"cts\", \"js\", \"json\", \"mjs\"),\n\t...extensions(\".eslintrc\", \"js\", \"json\", \"yml\"),\n\t...extensions(\".prettierrc\", \"json\", \"json5\", \"yaml\", \"yml\"),\n\t...extensions(\"prettier.config\", \"js\", \"mjs\", \"cjs\"),\n\t...extensions(\"babel.config\", \"cjs\", \"cts\", \"js\", \"json\", \"mjs\"),\n\t...extensions(\"jest.config\", \"cjs\", \"js\", \"json\", \"mjs\", \"ts\"),\n\t\"./src/**/*.js\",\n\t\".circleci/config.yml\",\n\t\".github/codecov.yml\",\n\t\".babelrc\",\n\t\".npmignore\",\n\t\".eslintrc\",\n\t\"CODE_OF_CONDUCT.md\",\n\t\"CONTRIBUTING.md\",\n\t\"codecov.yml\",\n\t\"DEVELOPMENT.md\",\n\t\"dist\",\n\t\"lib\",\n\t\"package-lock.json\",\n\t\"travis.yml\",\n\t\"yarn.lock\",\n];\n\nfunction extensions(base: string, ...extensions: string[]) {\n\treturn extensions.map((extension) => [base, extension].join(\".\"));\n}\n\nexport async function clearUnnecessaryFiles() {\n\tfor (const globPath of globPaths) {\n\t\tawait fs.rm(globPath, { force: true, recursive: true });\n\t}\n}\n"],"mappings":"AAAA,YAAY,QAAQ;AAEpB,MAAM,YAAY;AAAA,EACjB,GAAG,WAAW,YAAY,OAAO,OAAO,MAAM,QAAQ,KAAK;AAAA,EAC3D,GAAG,WAAW,aAAa,MAAM,QAAQ,KAAK;AAAA,EAC9C,GAAG,WAAW,eAAe,QAAQ,SAAS,QAAQ,KAAK;AAAA,EAC3D,GAAG,WAAW,mBAAmB,MAAM,OAAO,KAAK;AAAA,EACnD,GAAG,WAAW,gBAAgB,OAAO,OAAO,MAAM,QAAQ,KAAK;AAAA,EAC/D,GAAG,WAAW,eAAe,OAAO,MAAM,QAAQ,OAAO,IAAI;AAAA,EAC7D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAEA,SAAS,WAAW,SAAiBA,aAAsB;AAC1D,SAAOA,YAAW,IAAI,CAAC,cAAc,CAAC,MAAM,SAAS,EAAE,KAAK,GAAG,CAAC;AACjE;AAEA,eAAsB,wBAAwB;AAC7C,aAAW,YAAY,WAAW;AACjC,UAAM,GAAG,GAAG,UAAU,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC;AAAA,EACvD;AACD;","names":["extensions"]}
|
|
1
|
+
{"version":3,"sources":["../../src/steps/clearUnnecessaryFiles.ts"],"sourcesContent":["import * as fs from \"node:fs/promises\";\n\nconst globPaths = [\n\t...extensions(\".babelrc\", \"cjs\", \"cts\", \"js\", \"json\", \"mjs\"),\n\t...extensions(\".eslintrc\", \"js\", \"json\", \"yml\"),\n\t...extensions(\".prettierrc\", \"json\", \"json5\", \"yaml\", \"yml\"),\n\t...extensions(\"prettier.config\", \"js\", \"mjs\", \"cjs\"),\n\t...extensions(\"babel.config\", \"cjs\", \"cts\", \"js\", \"json\", \"mjs\"),\n\t...extensions(\"jest.config\", \"cjs\", \"js\", \"json\", \"mjs\", \"ts\"),\n\t\"./src/**/*.js\",\n\t\".circleci/config.yml\",\n\t\".github/codecov.yml\",\n\t\".babelrc\",\n\t\".npmignore\",\n\t\".eslintignore\",\n\t\".eslintrc\",\n\t\"CODE_OF_CONDUCT.md\",\n\t\"CONTRIBUTING.md\",\n\t\".npmpackagejsonlintrc.json\",\n\t\"codecov.yml\",\n\t\"DEVELOPMENT.md\",\n\t\"dist\",\n\t\"lib\",\n\t\"package-lock.json\",\n\t\"travis.yml\",\n\t\"yarn.lock\",\n];\n\nfunction extensions(base: string, ...extensions: string[]) {\n\treturn extensions.map((extension) => [base, extension].join(\".\"));\n}\n\nexport async function clearUnnecessaryFiles() {\n\tfor (const globPath of globPaths) {\n\t\tawait fs.rm(globPath, { force: true, recursive: true });\n\t}\n}\n"],"mappings":"AAAA,YAAY,QAAQ;AAEpB,MAAM,YAAY;AAAA,EACjB,GAAG,WAAW,YAAY,OAAO,OAAO,MAAM,QAAQ,KAAK;AAAA,EAC3D,GAAG,WAAW,aAAa,MAAM,QAAQ,KAAK;AAAA,EAC9C,GAAG,WAAW,eAAe,QAAQ,SAAS,QAAQ,KAAK;AAAA,EAC3D,GAAG,WAAW,mBAAmB,MAAM,OAAO,KAAK;AAAA,EACnD,GAAG,WAAW,gBAAgB,OAAO,OAAO,MAAM,QAAQ,KAAK;AAAA,EAC/D,GAAG,WAAW,eAAe,OAAO,MAAM,QAAQ,OAAO,IAAI;AAAA,EAC7D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAEA,SAAS,WAAW,SAAiBA,aAAsB;AAC1D,SAAOA,YAAW,IAAI,CAAC,cAAc,CAAC,MAAM,SAAS,EAAE,KAAK,GAAG,CAAC;AACjE;AAEA,eAAsB,wBAAwB;AAC7C,aAAW,YAAY,WAAW;AACjC,UAAM,GAAG,GAAG,UAAU,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC;AAAA,EACvD;AACD;","names":["extensions"]}
|
|
@@ -19,7 +19,8 @@ async function finalizeDependencies(options) {
|
|
|
19
19
|
"tsup",
|
|
20
20
|
"typescript",
|
|
21
21
|
...options.excludeAllContributors ? [] : ["all-contributors-cli"],
|
|
22
|
-
...options.excludeLintJson ? [] : ["eslint-plugin-jsonc"
|
|
22
|
+
...options.excludeLintJson ? [] : ["eslint-plugin-jsonc"],
|
|
23
|
+
...options.excludeLintJson && options.excludeLintPackageJson ? [] : ["jsonc-eslint-parser"],
|
|
23
24
|
...options.excludeLintKnip ? [] : ["knip"],
|
|
24
25
|
...options.excludeLintMd ? [] : [
|
|
25
26
|
"eslint-plugin-markdown",
|
|
@@ -27,7 +28,7 @@ async function finalizeDependencies(options) {
|
|
|
27
28
|
"markdownlint-cli",
|
|
28
29
|
"sentences-per-line"
|
|
29
30
|
],
|
|
30
|
-
...options.excludeLintPackageJson ? [] : ["
|
|
31
|
+
...options.excludeLintPackageJson ? [] : ["eslint-plugin-package-json"],
|
|
31
32
|
...options.excludeLintPerfectionist ? [] : ["eslint-plugin-perfectionist"],
|
|
32
33
|
...options.excludeLintSpelling ? [] : ["cspell"],
|
|
33
34
|
...options.excludeLintYml ? [] : ["eslint-plugin-yml", "yaml-eslint-parser"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/steps/finalizeDependencies.ts"],"sourcesContent":["import { execaCommand } from \"execa\";\n\nimport { readPackageData, removeDependencies } from \"../shared/packages.js\";\nimport { Options } from \"../shared/types.js\";\n\nexport async function finalizeDependencies(options: Options) {\n\tconst devDependencies = [\n\t\t\"@types/eslint\",\n\t\t\"@typescript-eslint/eslint-plugin\",\n\t\t\"@typescript-eslint/parser\",\n\t\t\"eslint\",\n\t\t\"eslint-plugin-deprecation\",\n\t\t\"eslint-plugin-eslint-comments\",\n\t\t\"eslint-plugin-jsdoc\",\n\t\t\"eslint-plugin-n\",\n\t\t\"eslint-plugin-regexp\",\n\t\t\"husky\",\n\t\t\"lint-staged\",\n\t\t\"prettier\",\n\t\t\"prettier-plugin-curly\",\n\t\t\"prettier-plugin-packagejson\",\n\t\t\"tsup\",\n\t\t\"typescript\",\n\t\t...(options.excludeAllContributors ? [] : [\"all-contributors-cli\"]),\n\t\t...(options.excludeLintJson\n\t\t\t? []\n\t\t\t: [\"
|
|
1
|
+
{"version":3,"sources":["../../src/steps/finalizeDependencies.ts"],"sourcesContent":["import { execaCommand } from \"execa\";\n\nimport { readPackageData, removeDependencies } from \"../shared/packages.js\";\nimport { Options } from \"../shared/types.js\";\n\nexport async function finalizeDependencies(options: Options) {\n\tconst devDependencies = [\n\t\t\"@types/eslint\",\n\t\t\"@typescript-eslint/eslint-plugin\",\n\t\t\"@typescript-eslint/parser\",\n\t\t\"eslint\",\n\t\t\"eslint-plugin-deprecation\",\n\t\t\"eslint-plugin-eslint-comments\",\n\t\t\"eslint-plugin-jsdoc\",\n\t\t\"eslint-plugin-n\",\n\t\t\"eslint-plugin-regexp\",\n\t\t\"husky\",\n\t\t\"lint-staged\",\n\t\t\"prettier\",\n\t\t\"prettier-plugin-curly\",\n\t\t\"prettier-plugin-packagejson\",\n\t\t\"tsup\",\n\t\t\"typescript\",\n\t\t...(options.excludeAllContributors ? [] : [\"all-contributors-cli\"]),\n\t\t...(options.excludeLintJson ? [] : [\"eslint-plugin-jsonc\"]),\n\t\t...(options.excludeLintJson && options.excludeLintPackageJson\n\t\t\t? []\n\t\t\t: [\"jsonc-eslint-parser\"]),\n\t\t...(options.excludeLintKnip ? [] : [\"knip\"]),\n\t\t...(options.excludeLintMd\n\t\t\t? []\n\t\t\t: [\n\t\t\t\t\t\"eslint-plugin-markdown\",\n\t\t\t\t\t\"markdownlint\",\n\t\t\t\t\t\"markdownlint-cli\",\n\t\t\t\t\t\"sentences-per-line\",\n\t\t\t ]),\n\t\t...(options.excludeLintPackageJson ? [] : [\"eslint-plugin-package-json\"]),\n\t\t...(options.excludeLintPerfectionist\n\t\t\t? []\n\t\t\t: [\"eslint-plugin-perfectionist\"]),\n\t\t...(options.excludeLintSpelling ? [] : [\"cspell\"]),\n\t\t...(options.excludeLintYml\n\t\t\t? []\n\t\t\t: [\"eslint-plugin-yml\", \"yaml-eslint-parser\"]),\n\t\t...(options.excludeReleases\n\t\t\t? []\n\t\t\t: [\n\t\t\t\t\t\"@release-it/conventional-changelog\",\n\t\t\t\t\t\"release-it\",\n\t\t\t\t\t\"should-semantic-release\",\n\t\t\t ]),\n\t\t...(options.excludeTests\n\t\t\t? []\n\t\t\t: [\n\t\t\t\t\t\"@vitest/coverage-v8\",\n\t\t\t\t\t\"console-fail-test\",\n\t\t\t\t\t\"eslint-plugin-no-only-tests\",\n\t\t\t\t\t\"eslint-plugin-vitest\",\n\t\t\t\t\t\"vitest\",\n\t\t\t ]),\n\t]\n\t\t.filter(Boolean)\n\t\t.sort()\n\t\t.map((packageName) => `${packageName}@latest`)\n\t\t.join(\" \");\n\n\tawait execaCommand(\n\t\t`pnpm add ${devDependencies} -D${options.offline ? \" --offline\" : \"\"}`,\n\t);\n\n\tif (!options.excludeAllContributors) {\n\t\tawait execaCommand(`npx all-contributors-cli generate`);\n\t\tawait removeDependencies(\n\t\t\t[\"all-contributors-cli\", \"all-contributors-for-repository\"],\n\t\t\t(await readPackageData()).devDependencies,\n\t\t\t\"-D\",\n\t\t);\n\t}\n\n\tawait execaCommand(`pnpm dedupe`);\n}\n"],"mappings":"AAAA,SAAS,oBAAoB;AAE7B,SAAS,iBAAiB,0BAA0B;AAGpD,eAAsB,q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tD,UAAM;AAAA,MACL,CAAC,wBAAwB,iCAAiC;AAAA,OACzD,MAAM,gBAAgB,GAAG;AAAA,MAC1B;AAAA,IACD;AAAA,EACD;AAEA,QAAM,aAAa,aAAa;AACjC;","names":[]}
|
|
@@ -22,7 +22,6 @@ async function initializeBranchProtectionSettings(octokit, { owner, repository }
|
|
|
22
22
|
{ context: "lint" },
|
|
23
23
|
{ context: "lint_knip" },
|
|
24
24
|
{ context: "lint_markdown" },
|
|
25
|
-
{ context: "lint_package_json" },
|
|
26
25
|
{ context: "lint_packages" },
|
|
27
26
|
{ context: "lint_spelling" },
|
|
28
27
|
{ context: "prettier" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/steps/initializeGitHubRepository/initializeBranchProtectionSettings.ts"],"sourcesContent":["import { RequestError } from \"@octokit/request-error\";\nimport { Octokit } from \"octokit\";\n\nimport { Options } from \"../../shared/types.js\";\n\nexport async function initializeBranchProtectionSettings(\n\toctokit: Octokit,\n\t{ owner, repository }: Pick<Options, \"owner\" | \"repository\">,\n) {\n\ttry {\n\t\tawait octokit.request(\n\t\t\t`PUT /repos/${owner}/${repository}/branches/main/protection`,\n\t\t\t{\n\t\t\t\tallow_deletions: false,\n\t\t\t\tallow_force_pushes: true,\n\t\t\t\tallow_fork_pushes: false,\n\t\t\t\tallow_fork_syncing: true,\n\t\t\t\tblock_creations: false,\n\t\t\t\tbranch: \"main\",\n\t\t\t\tenforce_admins: false,\n\t\t\t\towner,\n\t\t\t\trepo: repository,\n\t\t\t\trequired_conversation_resolution: true,\n\t\t\t\trequired_linear_history: false,\n\t\t\t\trequired_pull_request_reviews: null,\n\t\t\t\trequired_status_checks: {\n\t\t\t\t\tchecks: [\n\t\t\t\t\t\t{ context: \"build\" },\n\t\t\t\t\t\t{ context: \"compliance\" },\n\t\t\t\t\t\t{ context: \"lint\" },\n\t\t\t\t\t\t{ context: \"lint_knip\" },\n\t\t\t\t\t\t{ context: \"lint_markdown\" },\n\t\t\t\t\t\t{ context: \"
|
|
1
|
+
{"version":3,"sources":["../../../src/steps/initializeGitHubRepository/initializeBranchProtectionSettings.ts"],"sourcesContent":["import { RequestError } from \"@octokit/request-error\";\nimport { Octokit } from \"octokit\";\n\nimport { Options } from \"../../shared/types.js\";\n\nexport async function initializeBranchProtectionSettings(\n\toctokit: Octokit,\n\t{ owner, repository }: Pick<Options, \"owner\" | \"repository\">,\n) {\n\ttry {\n\t\tawait octokit.request(\n\t\t\t`PUT /repos/${owner}/${repository}/branches/main/protection`,\n\t\t\t{\n\t\t\t\tallow_deletions: false,\n\t\t\t\tallow_force_pushes: true,\n\t\t\t\tallow_fork_pushes: false,\n\t\t\t\tallow_fork_syncing: true,\n\t\t\t\tblock_creations: false,\n\t\t\t\tbranch: \"main\",\n\t\t\t\tenforce_admins: false,\n\t\t\t\towner,\n\t\t\t\trepo: repository,\n\t\t\t\trequired_conversation_resolution: true,\n\t\t\t\trequired_linear_history: false,\n\t\t\t\trequired_pull_request_reviews: null,\n\t\t\t\trequired_status_checks: {\n\t\t\t\t\tchecks: [\n\t\t\t\t\t\t{ context: \"build\" },\n\t\t\t\t\t\t{ context: \"compliance\" },\n\t\t\t\t\t\t{ context: \"lint\" },\n\t\t\t\t\t\t{ context: \"lint_knip\" },\n\t\t\t\t\t\t{ context: \"lint_markdown\" },\n\t\t\t\t\t\t{ context: \"lint_packages\" },\n\t\t\t\t\t\t{ context: \"lint_spelling\" },\n\t\t\t\t\t\t{ context: \"prettier\" },\n\t\t\t\t\t\t{ context: \"test\" },\n\t\t\t\t\t],\n\t\t\t\t\tstrict: false,\n\t\t\t\t},\n\t\t\t\trestrictions: null,\n\t\t\t},\n\t\t);\n\t} catch (error) {\n\t\tif ((error as RequestError).status === 403) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthrow error;\n\t}\n}\n"],"mappings":"AAKA,eAAsB,mCACrB,SACA,EAAE,OAAO,WAAW,GACnB;AACD,MAAI;AACH,UAAM,QAAQ;AAAA,MACb,cAAc,KAAK,IAAI,UAAU;AAAA,MACjC;AAAA,QACC,iBAAiB;AAAA,QACjB,oBAAoB;AAAA,QACpB,mBAAmB;AAAA,QACnB,oBAAoB;AAAA,QACpB,iBAAiB;AAAA,QACjB,QAAQ;AAAA,QACR,gBAAgB;AAAA,QAChB;AAAA,QACA,MAAM;AAAA,QACN,kCAAkC;AAAA,QAClC,yBAAyB;AAAA,QACzB,+BAA+B;AAAA,QAC/B,wBAAwB;AAAA,UACvB,QAAQ;AAAA,YACP,EAAE,SAAS,QAAQ;AAAA,YACnB,EAAE,SAAS,aAAa;AAAA,YACxB,EAAE,SAAS,OAAO;AAAA,YAClB,EAAE,SAAS,YAAY;AAAA,YACvB,EAAE,SAAS,gBAAgB;AAAA,YAC3B,EAAE,SAAS,gBAAgB;AAAA,YAC3B,EAAE,SAAS,gBAAgB;AAAA,YAC3B,EAAE,SAAS,WAAW;AAAA,YACtB,EAAE,SAAS,OAAO;AAAA,UACnB;AAAA,UACA,QAAQ;AAAA,QACT;AAAA,QACA,cAAc;AAAA,MACf;AAAA,IACD;AAAA,EACD,SAAS,OAAO;AACf,QAAK,MAAuB,WAAW,KAAK;AAC3C,aAAO;AAAA,IACR;AAEA,UAAM;AAAA,EACP;AACD;","names":[]}
|
|
@@ -12,6 +12,13 @@ module.exports = {
|
|
|
12
12
|
`}"plugin:n/recommended",${options.excludeLintPerfectionist ? "" : `
|
|
13
13
|
"plugin:perfectionist/recommended-natural",`}${options.excludeLintRegex ? "" : `"plugin:regexp/recommended",`}${options.excludeTests ? "" : `"plugin:vitest/recommended",`}
|
|
14
14
|
],
|
|
15
|
+
ignorePatterns: [
|
|
16
|
+
"!.*",${options.excludeTests ? "" : `
|
|
17
|
+
"coverage",`}
|
|
18
|
+
"lib",
|
|
19
|
+
"node_modules",
|
|
20
|
+
"pnpm-lock.yaml",
|
|
21
|
+
],
|
|
15
22
|
overrides: [${options.excludeLintMd ? "" : `
|
|
16
23
|
{
|
|
17
24
|
extends: ["plugin:markdown/recommended"],
|
|
@@ -82,6 +89,11 @@ module.exports = {
|
|
|
82
89
|
rules: {
|
|
83
90
|
"jsonc/no-comments": "off",
|
|
84
91
|
},
|
|
92
|
+
},`}${options.excludeLintPackageJson ? "" : `{
|
|
93
|
+
extends: ["plugin:package-json/recommended"],
|
|
94
|
+
files: ["package.json"],
|
|
95
|
+
parser: "jsonc-eslint-parser",
|
|
96
|
+
plugins: ["package-json"],
|
|
85
97
|
},`}${options.excludeTests ? "" : `
|
|
86
98
|
{
|
|
87
99
|
files: "**/*.test.ts",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/steps/writing/creation/createESLintRC.ts"],"sourcesContent":["import { Options } from \"../../../shared/types.js\";\nimport { formatTypeScript } from \"./formatters/formatTypeScript.js\";\n\nexport async function createESLintRC(options: Options) {\n\treturn await formatTypeScript(`/** @type {import(\"@types/eslint\").Linter.Config} */\nmodule.exports = {\n\tenv: {\n\t\tes2022: true,\n\t\tnode: true,\n\t},\n\textends: [\n\t\t\"eslint:recommended\",\n\t\t${\n\t\t\toptions.excludeLintESLint\n\t\t\t\t? \"\"\n\t\t\t\t: `\"plugin:eslint-comments/recommended\",\n\t\t`\n\t\t}\"plugin:n/recommended\",${\n\t\t\toptions.excludeLintPerfectionist\n\t\t\t\t? \"\"\n\t\t\t\t: `\n\t\t\"plugin:perfectionist/recommended-natural\",`\n\t\t}${options.excludeLintRegex ? \"\" : `\"plugin:regexp/recommended\",`}${\n\t\t\toptions.excludeTests ? \"\" : `\"plugin:vitest/recommended\",`\n\t\t}\n\t],\n\toverrides: [${\n\t\toptions.excludeLintMd\n\t\t\t? \"\"\n\t\t\t: `\n\t\t{\n\t\t\textends: [\"plugin:markdown/recommended\"],\n\t\t\tfiles: [\"**/*.md\"],\n\t\t\tprocessor: \"markdown/markdown\",\n\t\t},`\n\t}\n\t\t{\n\t\t\textends: [\n\t\t\t\t${\n\t\t\t\t\toptions.excludeLintJSDoc\n\t\t\t\t\t\t? \"\"\n\t\t\t\t\t\t: `\"plugin:jsdoc/recommended-typescript-error\",\n\t\t\t\t`\n\t\t\t\t}\"plugin:@typescript-eslint/${\n\t\t\t\t\toptions.excludeLintStrict ? \"recommended\" : \"strict\"\n\t\t\t\t}\",${\n\t\t\t\t\toptions.excludeLintStylistic\n\t\t\t\t\t\t? \"\"\n\t\t\t\t\t\t: `\n\t\t\t\t\"plugin:@typescript-eslint/stylistic\",`\n\t\t\t\t}\n\t\t\t],\n\t\t\tfiles: [\"**/*.ts\"],\n\t\t\tparser: \"@typescript-eslint/parser\",\n\t\t\trules: {\n\t\t\t\t// These off-by-default rules work well for this repo and we like them on.\n\t\t\t\t${\n\t\t\t\t\toptions.excludeLintJSDoc\n\t\t\t\t\t\t? \"\"\n\t\t\t\t\t\t: `\"jsdoc/informative-docs\": \"error\",\n\t\t\t\t`\n\t\t\t\t}\"logical-assignment-operators\": [\n\t\t\t\t\t\"error\",\n\t\t\t\t\t\"always\",\n\t\t\t\t\t{ enforceForIfStatements: true },\n\t\t\t\t],\n\t\t\t\t\"operator-assignment\": \"error\",${\n\t\t\t\t\toptions.excludeLintJSDoc\n\t\t\t\t\t\t? \"\"\n\t\t\t\t\t\t: `\n\n\t\t\t\t// These on-by-default rules don't work well for this repo and we like them off.\n\t\t\t\t\"jsdoc/require-jsdoc\": \"off\",\n\t\t\t\t\"jsdoc/require-param\": \"off\",\n\t\t\t\t\"jsdoc/require-property\": \"off\",\n\t\t\t\t\"jsdoc/require-returns\": \"off\",`\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tfiles: \"**/*.md/*.ts\",\n\t\t\trules: {\n\t\t\t\t\"n/no-missing-import\": [\n\t\t\t\t\t\"error\",\n\t\t\t\t\t{ allowModules: [\"${options.repository}\"] },\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t${\n\t\t\t\toptions.excludeLintMd\n\t\t\t\t\t? \"\"\n\t\t\t\t\t: `excludedFiles: [\"**/*.md/*.ts\"],\n\t\t\t`\n\t\t\t}extends: [\n\t\t\t\t\"plugin:@typescript-eslint/${\n\t\t\t\t\toptions.excludeLintStrict ? \"recommended\" : \"strict\"\n\t\t\t\t}-type-checked\",${\n\t\t\t\t\toptions.excludeLintStylistic\n\t\t\t\t\t\t? \"\"\n\t\t\t\t\t\t: `\n\t\t\t\t\"plugin:@typescript-eslint/stylistic-type-checked\",`\n\t\t\t\t}\n\t\t\t],\n\t\t\tfiles: [\"**/*.ts\"],\n\t\t\tparser: \"@typescript-eslint/parser\",\n\t\t\tparserOptions: {\n\t\t\t\tproject: \"./tsconfig.eslint.json\",\n\t\t\t},${\n\t\t\t\toptions.excludeLintDeprecation\n\t\t\t\t\t? \"\"\n\t\t\t\t\t: `rules: {\n\t\t\t\t// These off-by-default rules work well for this repo and we like them on.\n\t\t\t\t\"deprecation/deprecation\": \"error\",\n\t\t\t},`\n\t\t\t}\n\t\t},\n\t\t${\n\t\t\toptions.excludeLintJson\n\t\t\t\t? \"\"\n\t\t\t\t: `{\n\t\t\texcludedFiles: [\"package.json\"],\n\t\t\textends: [\"plugin:jsonc/recommended-with-json\"],\n\t\t\tfiles: [\"*.json\", \"*.jsonc\"],\n\t\t\tparser: \"jsonc-eslint-parser\",\n\t\t\trules: {\n\t\t\t\t\"jsonc/comma-dangle\": \"off\",\n\t\t\t\t\"jsonc/sort-keys\": \"error\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tfiles: [\"*.jsonc\"],\n\t\t\trules: {\n\t\t\t\t\"jsonc/no-comments\": \"off\",\n\t\t\t},\n\t\t},`\n\t\t}${\n\t\t\toptions.excludeTests\n\t\t\t\t? \"\"\n\t\t\t\t: `\\n{\n\t\t\tfiles: \"**/*.test.ts\",\n\t\t\trules: {\n\t\t\t\t// These on-by-default rules aren't useful in test files.\n\t\t\t\t\"@typescript-eslint/no-unsafe-assignment\": \"off\",\n\t\t\t\t\"@typescript-eslint/no-unsafe-call\": \"off\",\n\t\t\t},\n\t\t},`\n\t\t}${\n\t\t\toptions.excludeLintYml\n\t\t\t\t? \"\"\n\t\t\t\t: `\\n{\n\t\t\textends: [\"plugin:yml/standard\", \"plugin:yml/prettier\"],\n\t\t\tfiles: [\"**/*.{yml,yaml}\"],\n\t\t\tparser: \"yaml-eslint-parser\",\n\t\t\trules: {\n\t\t\t\t\"yml/file-extension\": [\"error\", { extension: \"yml\" }],\n\t\t\t\t\"yml/sort-keys\": [\n\t\t\t\t\t\"error\",\n\t\t\t\t\t{\n\t\t\t\t\t\torder: { type: \"asc\" },\n\t\t\t\t\t\tpathPattern: \"^.*$\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\t\"yml/sort-sequence-values\": [\n\t\t\t\t\t\"error\",\n\t\t\t\t\t{\n\t\t\t\t\t\torder: { type: \"asc\" },\n\t\t\t\t\t\tpathPattern: \"^.*$\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t`\n\t\t}],\n\tparser: \"@typescript-eslint/parser\",\n\tplugins: [\n\t\t\"@typescript-eslint\",\n\t\t${\n\t\t\toptions.excludeLintDeprecation\n\t\t\t\t? \"\"\n\t\t\t\t: `\"deprecation\",\n\t\t`\n\t\t}${\n\t\t\toptions.excludeLintJSDoc\n\t\t\t\t? \"\"\n\t\t\t\t: `\"jsdoc\",\n\t\t`\n\t\t}${options.excludeTests ? \"\" : `\"no-only-tests\",`}${\n\t\t\toptions.excludeLintPerfectionist ? \"\" : `\"perfectionist\",`\n\t\t}${options.excludeLintRegex ? \"\" : `\"regexp\",`}${\n\t\t\toptions.excludeTests ? \"\" : `\\n\"vitest\",`\n\t\t}\n\t],\n\treportUnusedDisableDirectives: true,\n\troot: true,\n\trules: {\n\t\t// These off/less-strict-by-default rules work well for this repo and we like them on.\n\t\t\"@typescript-eslint/no-unused-vars\": [\"error\", { caughtErrors: \"all\" }],${\n\t\t\toptions.excludeTests ? \"\" : `\\n\"no-only-tests/no-only-tests\": \"error\",`\n\t\t}\n\n\t\t// These on-by-default rules don't work well for this repo and we like them off.\n\t\t\"no-case-declarations\": \"off\",\n\t\t\"no-constant-condition\": \"off\",\n\t\t\"no-inner-declarations\": \"off\",\n\t\t\"no-mixed-spaces-and-tabs\": \"off\",\n\n\t\t${\n\t\t\toptions.excludeLintStylistic\n\t\t\t\t? \"\"\n\t\t\t\t: `// Stylistic concerns that don't interfere with Prettier\n\t\t\"@typescript-eslint/padding-line-between-statements\": [\n\t\t\t\"error\",\n\t\t\t{ blankLine: \"always\", next: \"*\", prev: \"block-like\" },\n\t\t],\n\t\t\"no-useless-rename\": \"error\",\n\t\t\"object-shorthand\": \"error\",\n\t\t`\n\t\t}${\n\t\t\toptions.excludeLintPerfectionist\n\t\t\t\t? \"\"\n\t\t\t\t: `\"perfectionist/sort-objects\": [\n\t\t\t\"error\",\n\t\t\t{\n\t\t\t\torder: \"asc\",\n\t\t\t\t\"partition-by-comment\": true,\n\t\t\t\ttype: \"natural\",\n\t\t\t},\n\t\t],`\n\t\t}\n\t},\n};\n`);\n}\n"],"mappings":"AACA,SAAS,wBAAwB;AAEjC,eAAsB,eAAe,SAAkB;AACtD,SAAO,MAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAS5B,QAAQ,oBACL,KACA;AAAA,GAEJ,0BACC,QAAQ,2BACL,KACA;AAAA,8CAEJ,GAAG,QAAQ,mBAAmB,KAAK,8BAA8B,GAChE,QAAQ,eAAe,KAAK,8BAC7B;AAAA;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../../../src/steps/writing/creation/createESLintRC.ts"],"sourcesContent":["import { Options } from \"../../../shared/types.js\";\nimport { formatTypeScript } from \"./formatters/formatTypeScript.js\";\n\nexport async function createESLintRC(options: Options) {\n\treturn await formatTypeScript(`/** @type {import(\"@types/eslint\").Linter.Config} */\nmodule.exports = {\n\tenv: {\n\t\tes2022: true,\n\t\tnode: true,\n\t},\n\textends: [\n\t\t\"eslint:recommended\",\n\t\t${\n\t\t\toptions.excludeLintESLint\n\t\t\t\t? \"\"\n\t\t\t\t: `\"plugin:eslint-comments/recommended\",\n\t\t`\n\t\t}\"plugin:n/recommended\",${\n\t\t\toptions.excludeLintPerfectionist\n\t\t\t\t? \"\"\n\t\t\t\t: `\n\t\t\"plugin:perfectionist/recommended-natural\",`\n\t\t}${options.excludeLintRegex ? \"\" : `\"plugin:regexp/recommended\",`}${\n\t\t\toptions.excludeTests ? \"\" : `\"plugin:vitest/recommended\",`\n\t\t}\n\t],\n\tignorePatterns: [\n\t\t\"!.*\",${options.excludeTests ? \"\" : `\\n\t\t\"coverage\",`}\n\t\t\"lib\",\n\t\t\"node_modules\",\n\t\t\"pnpm-lock.yaml\",\n\t],\n\toverrides: [${\n\t\toptions.excludeLintMd\n\t\t\t? \"\"\n\t\t\t: `\n\t\t{\n\t\t\textends: [\"plugin:markdown/recommended\"],\n\t\t\tfiles: [\"**/*.md\"],\n\t\t\tprocessor: \"markdown/markdown\",\n\t\t},`\n\t}\n\t\t{\n\t\t\textends: [\n\t\t\t\t${\n\t\t\t\t\toptions.excludeLintJSDoc\n\t\t\t\t\t\t? \"\"\n\t\t\t\t\t\t: `\"plugin:jsdoc/recommended-typescript-error\",\n\t\t\t\t`\n\t\t\t\t}\"plugin:@typescript-eslint/${\n\t\t\t\t\toptions.excludeLintStrict ? \"recommended\" : \"strict\"\n\t\t\t\t}\",${\n\t\t\t\t\toptions.excludeLintStylistic\n\t\t\t\t\t\t? \"\"\n\t\t\t\t\t\t: `\n\t\t\t\t\"plugin:@typescript-eslint/stylistic\",`\n\t\t\t\t}\n\t\t\t],\n\t\t\tfiles: [\"**/*.ts\"],\n\t\t\tparser: \"@typescript-eslint/parser\",\n\t\t\trules: {\n\t\t\t\t// These off-by-default rules work well for this repo and we like them on.\n\t\t\t\t${\n\t\t\t\t\toptions.excludeLintJSDoc\n\t\t\t\t\t\t? \"\"\n\t\t\t\t\t\t: `\"jsdoc/informative-docs\": \"error\",\n\t\t\t\t`\n\t\t\t\t}\"logical-assignment-operators\": [\n\t\t\t\t\t\"error\",\n\t\t\t\t\t\"always\",\n\t\t\t\t\t{ enforceForIfStatements: true },\n\t\t\t\t],\n\t\t\t\t\"operator-assignment\": \"error\",${\n\t\t\t\t\toptions.excludeLintJSDoc\n\t\t\t\t\t\t? \"\"\n\t\t\t\t\t\t: `\n\n\t\t\t\t// These on-by-default rules don't work well for this repo and we like them off.\n\t\t\t\t\"jsdoc/require-jsdoc\": \"off\",\n\t\t\t\t\"jsdoc/require-param\": \"off\",\n\t\t\t\t\"jsdoc/require-property\": \"off\",\n\t\t\t\t\"jsdoc/require-returns\": \"off\",`\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tfiles: \"**/*.md/*.ts\",\n\t\t\trules: {\n\t\t\t\t\"n/no-missing-import\": [\n\t\t\t\t\t\"error\",\n\t\t\t\t\t{ allowModules: [\"${options.repository}\"] },\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t${\n\t\t\t\toptions.excludeLintMd\n\t\t\t\t\t? \"\"\n\t\t\t\t\t: `excludedFiles: [\"**/*.md/*.ts\"],\n\t\t\t`\n\t\t\t}extends: [\n\t\t\t\t\"plugin:@typescript-eslint/${\n\t\t\t\t\toptions.excludeLintStrict ? \"recommended\" : \"strict\"\n\t\t\t\t}-type-checked\",${\n\t\t\t\t\toptions.excludeLintStylistic\n\t\t\t\t\t\t? \"\"\n\t\t\t\t\t\t: `\n\t\t\t\t\"plugin:@typescript-eslint/stylistic-type-checked\",`\n\t\t\t\t}\n\t\t\t],\n\t\t\tfiles: [\"**/*.ts\"],\n\t\t\tparser: \"@typescript-eslint/parser\",\n\t\t\tparserOptions: {\n\t\t\t\tproject: \"./tsconfig.eslint.json\",\n\t\t\t},${\n\t\t\t\toptions.excludeLintDeprecation\n\t\t\t\t\t? \"\"\n\t\t\t\t\t: `rules: {\n\t\t\t\t// These off-by-default rules work well for this repo and we like them on.\n\t\t\t\t\"deprecation/deprecation\": \"error\",\n\t\t\t},`\n\t\t\t}\n\t\t},\n\t\t${\n\t\t\toptions.excludeLintJson\n\t\t\t\t? \"\"\n\t\t\t\t: `{\n\t\t\texcludedFiles: [\"package.json\"],\n\t\t\textends: [\"plugin:jsonc/recommended-with-json\"],\n\t\t\tfiles: [\"*.json\", \"*.jsonc\"],\n\t\t\tparser: \"jsonc-eslint-parser\",\n\t\t\trules: {\n\t\t\t\t\"jsonc/comma-dangle\": \"off\",\n\t\t\t\t\"jsonc/sort-keys\": \"error\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tfiles: [\"*.jsonc\"],\n\t\t\trules: {\n\t\t\t\t\"jsonc/no-comments\": \"off\",\n\t\t\t},\n\t\t},`\n\t\t}${\n\t\t\toptions.excludeLintPackageJson\n\t\t\t\t? \"\"\n\t\t\t\t: `{\n\t\t\textends: [\"plugin:package-json/recommended\"],\n\t\t\tfiles: [\"package.json\"],\n\t\t\tparser: \"jsonc-eslint-parser\",\n\t\t\tplugins: [\"package-json\"],\n\t\t},`\n\t\t}${\n\t\t\toptions.excludeTests\n\t\t\t\t? \"\"\n\t\t\t\t: `\\n{\n\t\t\tfiles: \"**/*.test.ts\",\n\t\t\trules: {\n\t\t\t\t// These on-by-default rules aren't useful in test files.\n\t\t\t\t\"@typescript-eslint/no-unsafe-assignment\": \"off\",\n\t\t\t\t\"@typescript-eslint/no-unsafe-call\": \"off\",\n\t\t\t},\n\t\t},`\n\t\t}${\n\t\t\toptions.excludeLintYml\n\t\t\t\t? \"\"\n\t\t\t\t: `\\n{\n\t\t\textends: [\"plugin:yml/standard\", \"plugin:yml/prettier\"],\n\t\t\tfiles: [\"**/*.{yml,yaml}\"],\n\t\t\tparser: \"yaml-eslint-parser\",\n\t\t\trules: {\n\t\t\t\t\"yml/file-extension\": [\"error\", { extension: \"yml\" }],\n\t\t\t\t\"yml/sort-keys\": [\n\t\t\t\t\t\"error\",\n\t\t\t\t\t{\n\t\t\t\t\t\torder: { type: \"asc\" },\n\t\t\t\t\t\tpathPattern: \"^.*$\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\t\"yml/sort-sequence-values\": [\n\t\t\t\t\t\"error\",\n\t\t\t\t\t{\n\t\t\t\t\t\torder: { type: \"asc\" },\n\t\t\t\t\t\tpathPattern: \"^.*$\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t`\n\t\t}],\n\tparser: \"@typescript-eslint/parser\",\n\tplugins: [\n\t\t\"@typescript-eslint\",\n\t\t${\n\t\t\toptions.excludeLintDeprecation\n\t\t\t\t? \"\"\n\t\t\t\t: `\"deprecation\",\n\t\t`\n\t\t}${\n\t\t\toptions.excludeLintJSDoc\n\t\t\t\t? \"\"\n\t\t\t\t: `\"jsdoc\",\n\t\t`\n\t\t}${options.excludeTests ? \"\" : `\"no-only-tests\",`}${\n\t\t\toptions.excludeLintPerfectionist ? \"\" : `\"perfectionist\",`\n\t\t}${options.excludeLintRegex ? \"\" : `\"regexp\",`}${\n\t\t\toptions.excludeTests ? \"\" : `\\n\"vitest\",`\n\t\t}\n\t],\n\treportUnusedDisableDirectives: true,\n\troot: true,\n\trules: {\n\t\t// These off/less-strict-by-default rules work well for this repo and we like them on.\n\t\t\"@typescript-eslint/no-unused-vars\": [\"error\", { caughtErrors: \"all\" }],${\n\t\t\toptions.excludeTests ? \"\" : `\\n\"no-only-tests/no-only-tests\": \"error\",`\n\t\t}\n\n\t\t// These on-by-default rules don't work well for this repo and we like them off.\n\t\t\"no-case-declarations\": \"off\",\n\t\t\"no-constant-condition\": \"off\",\n\t\t\"no-inner-declarations\": \"off\",\n\t\t\"no-mixed-spaces-and-tabs\": \"off\",\n\n\t\t${\n\t\t\toptions.excludeLintStylistic\n\t\t\t\t? \"\"\n\t\t\t\t: `// Stylistic concerns that don't interfere with Prettier\n\t\t\"@typescript-eslint/padding-line-between-statements\": [\n\t\t\t\"error\",\n\t\t\t{ blankLine: \"always\", next: \"*\", prev: \"block-like\" },\n\t\t],\n\t\t\"no-useless-rename\": \"error\",\n\t\t\"object-shorthand\": \"error\",\n\t\t`\n\t\t}${\n\t\t\toptions.excludeLintPerfectionist\n\t\t\t\t? \"\"\n\t\t\t\t: `\"perfectionist/sort-objects\": [\n\t\t\t\"error\",\n\t\t\t{\n\t\t\t\torder: \"asc\",\n\t\t\t\t\"partition-by-comment\": true,\n\t\t\t\ttype: \"natural\",\n\t\t\t},\n\t\t],`\n\t\t}\n\t},\n};\n`);\n}\n"],"mappings":"AACA,SAAS,wBAAwB;AAEjC,eAAsB,eAAe,SAAkB;AACtD,SAAO,MAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAS5B,QAAQ,oBACL,KACA;AAAA,GAEJ,0BACC,QAAQ,2BACL,KACA;AAAA,8CAEJ,GAAG,QAAQ,mBAAmB,KAAK,8BAA8B,GAChE,QAAQ,eAAe,KAAK,8BAC7B;AAAA;AAAA;AAAA,UAGQ,QAAQ,eAAe,KAAK;AAAA,cAAiB;AAAA;AAAA;AAAA;AAAA;AAAA,eAMrD,QAAQ,gBACL,KACA;AAAA;AAAA;AAAA;AAAA;AAAA,KAMJ;AAAA;AAAA;AAAA,MAII,QAAQ,mBACL,KACA;AAAA,KAEJ,8BACC,QAAQ,oBAAoB,gBAAgB,QAC7C,KACC,QAAQ,uBACL,KACA;AAAA,2CAEJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAOC,QAAQ,mBACL,KACA;AAAA,KAEJ;AAAA;AAAA;AAAA;AAAA;AAAA,qCAMC,QAAQ,mBACL,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oCAOJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAQqB,QAAQ,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA,KAMvC,QAAQ,gBACL,KACA;AAAA,IAEJ;AAAA,iCAEE,QAAQ,oBAAoB,gBAAgB,QAC7C,kBACC,QAAQ,uBACL,KACA;AAAA,wDAEJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAOA,QAAQ,yBACL,KACA;AAAA;AAAA;AAAA,MAIJ;AAAA;AAAA,IAGA,QAAQ,kBACL,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAgBJ,GACC,QAAQ,yBACL,KACA;AAAA;AAAA;AAAA;AAAA;AAAA,KAMJ,GACC,QAAQ,eACL,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAQJ,GACC,QAAQ,iBACL,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuBJ;AAAA;AAAA;AAAA;AAAA,IAKC,QAAQ,yBACL,KACA;AAAA,GAEJ,GACC,QAAQ,mBACL,KACA;AAAA,GAEJ,GAAG,QAAQ,eAAe,KAAK,kBAAkB,GAChD,QAAQ,2BAA2B,KAAK,kBACzC,GAAG,QAAQ,mBAAmB,KAAK,WAAW,GAC7C,QAAQ,eAAe,KAAK;AAAA,UAC7B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4EAOC,QAAQ,eAAe,KAAK;AAAA,wCAC7B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASC,QAAQ,uBACL,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQJ,GACC,QAAQ,2BACL,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAQJ;AAAA;AAAA;AAAA,CAGD;AACD;","names":[]}
|
|
@@ -12,7 +12,6 @@ function createLintingSection(options) {
|
|
|
12
12
|
const lintLines = [
|
|
13
13
|
!options.excludeLintKnip && `- \`pnpm lint:knip\` ([knip](https://github.com/webpro/knip)): Detects unused files, dependencies, and code exports`,
|
|
14
14
|
!options.excludeLintMd && `- \`pnpm lint:md\` ([Markdownlint](https://github.com/DavidAnson/markdownlint): Checks Markdown source files`,
|
|
15
|
-
!options.excludeLintPackageJson && `- \`pnpm lint:package-json\` ([npm-package-json-lint](https://npmpackagejsonlint.org/)): Lints the \`package.json\` file`,
|
|
16
15
|
!options.excludeLintPackages && `- \`pnpm lint:packages\` ([pnpm dedupe --check](https://pnpm.io/cli/dedupe)): Checks for unnecessarily duplicated packages in the \`pnpm-lock.yml\` file`,
|
|
17
16
|
!options.excludeLintSpelling && `- \`pnpm lint:spelling\` ([cspell](https://cspell.org)): Spell checks across all source files`
|
|
18
17
|
].filter(Boolean);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/steps/writing/creation/dotGitHub/createDevelopment/index.ts"],"sourcesContent":["import { readFileSafe } from \"../../../../../shared/readFileSafe.js\";\nimport { Options } from \"../../../../../shared/types.js\";\nimport { splitIntoSections } from \"./splitIntoSections.js\";\n\nconst headingAliases = new Map([\n\t[\"build\", \"Building\"],\n\t[\"builds\", \"Building\"],\n\t[\"format\", \"Formatting\"],\n\t[\"lint\", \"Linting\"],\n\t[\"test\", \"Testing\"],\n\t[\"tests\", \"Testing\"],\n]);\n\nfunction createLintingSection(options: Options) {\n\tconst lintLines = [\n\t\t!options.excludeLintKnip &&\n\t\t\t`- \\`pnpm lint:knip\\` ([knip](https://github.com/webpro/knip)): Detects unused files, dependencies, and code exports`,\n\t\t!options.excludeLintMd &&\n\t\t\t`- \\`pnpm lint:md\\` ([Markdownlint](https://github.com/DavidAnson/markdownlint): Checks Markdown source files`,\n\t\t!options.
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/steps/writing/creation/dotGitHub/createDevelopment/index.ts"],"sourcesContent":["import { readFileSafe } from \"../../../../../shared/readFileSafe.js\";\nimport { Options } from \"../../../../../shared/types.js\";\nimport { splitIntoSections } from \"./splitIntoSections.js\";\n\nconst headingAliases = new Map([\n\t[\"build\", \"Building\"],\n\t[\"builds\", \"Building\"],\n\t[\"format\", \"Formatting\"],\n\t[\"lint\", \"Linting\"],\n\t[\"test\", \"Testing\"],\n\t[\"tests\", \"Testing\"],\n]);\n\nfunction createLintingSection(options: Options) {\n\tconst lintLines = [\n\t\t!options.excludeLintKnip &&\n\t\t\t`- \\`pnpm lint:knip\\` ([knip](https://github.com/webpro/knip)): Detects unused files, dependencies, and code exports`,\n\t\t!options.excludeLintMd &&\n\t\t\t`- \\`pnpm lint:md\\` ([Markdownlint](https://github.com/DavidAnson/markdownlint): Checks Markdown source files`,\n\t\t!options.excludeLintPackages &&\n\t\t\t`- \\`pnpm lint:packages\\` ([pnpm dedupe --check](https://pnpm.io/cli/dedupe)): Checks for unnecessarily duplicated packages in the \\`pnpm-lock.yml\\` file`,\n\t\t!options.excludeLintSpelling &&\n\t\t\t`- \\`pnpm lint:spelling\\` ([cspell](https://cspell.org)): Spell checks across all source files`,\n\t].filter(Boolean);\n\n\treturn lintLines.length\n\t\t? [\n\t\t\t\t`This package includes several forms of linting to enforce consistent code quality and styling.`,\n\t\t\t\t`Each should be shown in VS Code, and can be run manually on the command-line:`,\n\t\t\t\t``,\n\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...lintLines,\n\t\t\t\t``,\n\t\t\t\t`Read the individual documentation for each linter to understand how it can be configured and used best.`,\n\t\t\t\t``,\n\t\t\t\t`For example, ESLint can be run with \\`--fix\\` to auto-fix some lint rule complaints:`,\n\t\t ].join(\"\\n\")\n\t\t: `[ESLint](https://eslint.org) is used with with [typescript-eslint](https://typescript-eslint.io)) to lint JavaScript and TypeScript source files.\nYou can run it locally on the command-line:\n\n\\`\\`\\`shell\npnpm run lint\n\\`\\`\\`\n\nESLint can be run with \\`--fix\\` to auto-fix some lint rule complaints:`;\n}\n\nexport async function createDevelopment(options: Options) {\n\tconst existingContents = await readFileSafe(\".github/DEVELOPMENT.md\", \"\");\n\n\tconst newSections = {\n\t\t\"## Building\": `Run [**tsup**](https://tsup.egoist.dev) locally to build source files from \\`src/\\` into output files in \\`lib/\\`:\n\n\\`\\`\\`shell\npnpm build\n\\`\\`\\`\n\nAdd \\`--watch\\` to run the builder in a watch mode that continuously cleans and recreates \\`lib/\\` as you save files:\n\n\\`\\`\\`shell\npnpm build --watch\n\\`\\`\\``,\n\t\t\"## Formatting\": `[Prettier](https://prettier.io) is used to format code.\nIt should be applied automatically when you save files in VS Code or make a Git commit.\n\nTo manually reformat all files, you can run:\n\n\\`\\`\\`shell\npnpm format --write\n\\`\\`\\``,\n\t\t\"## Linting\": `${createLintingSection(options)}\n\n\\`\\`\\`shell\npnpm run lint --fix\n\\`\\`\\`\n\nNote that you'll likely need to run \\`pnpm build\\` before \\`pnpm lint\\` so that lint rules which check the file system can pick up on any built files.`,\n\t\t...(!options.excludeTests && {\n\t\t\t\"## Testing\": `[Vitest](https://vitest.dev) is used for tests.\nYou can run it locally on the command-line:\n\n\\`\\`\\`shell\npnpm run test\n\\`\\`\\`\n\nAdd the \\`--coverage\\` flag to compute test coverage and place reports in the \\`coverage/\\` directory:\n\n\\`\\`\\`shell\npnpm run test --coverage\n\\`\\`\\`\n\nNote that [console-fail-test](https://github.com/JoshuaKGoldberg/console-fail-test) is enabled for all test runs.\nCalls to \\`console.log\\`, \\`console.warn\\`, and other console methods will cause a test to fail.`,\n\n\t\t\t\"### Debugging Tests\": `This repository includes a [VS Code launch configuration](https://code.visualstudio.com/docs/editor/debugging) for debugging unit tests.\nTo launch it, open a test file, then run _Debug Current Test File_ from the VS Code Debug panel (or press F5).`,\n\t\t}),\n\t\t\"## Type Checking\": `You should be able to see suggestions from [TypeScript](https://typescriptlang.org) in your editor for all open files.\n\nHowever, it can be useful to run the TypeScript command-line (\\`tsc\\`) to type check all files in \\`src/\\`:\n\n\\`\\`\\`shell\npnpm tsc\n\\`\\`\\`\n\nAdd \\`--watch\\` to keep the type checker running in a watch mode that updates the display as you save files:\n\n\\`\\`\\`shell\npnpm tsc --watch\n\\`\\`\\``,\n\t};\n\n\tconst newSectionHeadings = new Set([\n\t\t\"Development\",\n\t\tObject.keys(newSections).map((key) => key.replace(/^#* /, \"\")),\n\t]);\n\n\tconst preservedSections = Object.fromEntries(\n\t\tsplitIntoSections(existingContents).filter(([key]) => {\n\t\t\tconst keyText = key.replace(/^#* /, \"\");\n\t\t\treturn !newSectionHeadings.has(\n\t\t\t\theadingAliases.get(keyText.toLowerCase()) ?? keyText,\n\t\t\t);\n\t\t}),\n\t);\n\n\tconst result = `# Development\n${\n\toptions.guide\n\t\t? `\n> If you'd like a more guided walkthrough, see [${options.guide.title}](${options.guide.href}).\n> It'll walk you through the common activities you'll need to contribute.\n`\n\t\t: \"\"\n}\nAfter [forking the repo from GitHub](https://help.github.com/articles/fork-a-repo) and [installing pnpm](https://pnpm.io/installation):\n\n\\`\\`\\`shell\ngit clone https://github.com/<your-name-here>/${options.repository}\ncd ${options.repository}\npnpm install\n\\`\\`\\`\n\n> This repository includes a list of suggested VS Code extensions.\n> 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\n${Object.entries({ ...newSections, ...preservedSections })\n\t.map(\n\t\t([heading, content]) => `${heading}\n\n${content}`,\n\t)\n\t.join(\"\\n\\n\")}\n`;\n\n\treturn result;\n}\n"],"mappings":"AAAA,SAAS,oBAAoB;AAE7B,SAAS,yBAAyB;AAElC,MAAM,iBAAiB,oBAAI,IAAI;AAAA,EAC9B,CAAC,SAAS,UAAU;AAAA,EACpB,CAAC,UAAU,UAAU;AAAA,EACrB,CAAC,UAAU,YAAY;AAAA,EACvB,CAAC,QAAQ,SAAS;AAAA,EAClB,CAAC,QAAQ,SAAS;AAAA,EAClB,CAAC,SAAS,SAAS;AACpB,CAAC;AAED,SAAS,qBAAqB,SAAkB;AAC/C,QAAM,YAAY;AAAA,IACjB,CAAC,QAAQ,mBACR;AA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AC,mBAAmB;AAAA,QAC1B,eAAe,IAAI,QAAQ,YAAY,CAAC,KAAK;AAAA,MAC9C;AAAA,IACD,CAAC;AAAA,EACF;AAEA,QAAM,SAAS;AAAA,EAEf,QAAQ,QACL;AAAA,kDAC8C,QAAQ,MAAM,KAAK,KAAK,QAAQ,MAAM,IAAI;AAAA;AAAA,IAGxF,EACJ;AAAA;AAAA;AAAA;AAAA,gDAIgD,QAAQ,UAAU;AAAA,KAC7D,QAAQ,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOrB,OAAO,QAAQ,EAAE,GAAG,aAAa,GAAG,kBAAkB,CAAC,EACvD;AAAA,IACA,CAAC,CAAC,SAAS,OAAO,MAAM,GAAG,OAAO;AAAA;AAAA,EAElC,OAAO;AAAA,EACR,EACC,KAAK,MAAM,CAAC;AAAA;AAGb,SAAO;AACR;","names":[]}
|
|
@@ -8,7 +8,6 @@ declare function createWorkflows(options: Options): {
|
|
|
8
8
|
"release.yml"?: string | undefined;
|
|
9
9
|
"lint-spelling.yml"?: string | undefined;
|
|
10
10
|
"lint-packages.yml"?: string | undefined;
|
|
11
|
-
"lint-package-json.yml"?: string | undefined;
|
|
12
11
|
"lint-markdown.yml"?: string | undefined;
|
|
13
12
|
"lint-knip.yml"?: string | undefined;
|
|
14
13
|
"accessibility-alt-text-bot.yml": string;
|
|
@@ -122,12 +122,6 @@ echo "See https://github.com/actions-ecosystem/action-remove-labels/issues/221."
|
|
|
122
122
|
runs: ["pnpm lint:md"]
|
|
123
123
|
})
|
|
124
124
|
},
|
|
125
|
-
...!options.excludeLintPackageJson && {
|
|
126
|
-
"lint-package-json.yml": createWorkflowFile({
|
|
127
|
-
name: "Lint Package JSON",
|
|
128
|
-
runs: ["pnpm lint:package-json"]
|
|
129
|
-
})
|
|
130
|
-
},
|
|
131
125
|
...!options.excludeLintPackages && {
|
|
132
126
|
"lint-packages.yml": createWorkflowFile({
|
|
133
127
|
name: "Lint Packages",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/steps/writing/creation/dotGitHub/createWorkflows.ts"],"sourcesContent":["/* spellchecker: disable */\nimport { Options } from \"../../../../shared/types.js\";\nimport { createWorkflowFile } from \"./createWorkflowFile.js\";\n\nexport function createWorkflows(options: Options) {\n\treturn {\n\t\t\"build.yml\": createWorkflowFile({\n\t\t\tname: \"Build\",\n\t\t\truns: [\"pnpm build\", \"node ./lib/index.js\"],\n\t\t}),\n\t\t\"pr-review-requested.yml\": createWorkflowFile({\n\t\t\tname: \"PR Review Requested\",\n\t\t\ton: {\n\t\t\t\tpull_request_target: {\n\t\t\t\t\ttypes: [\"review_requested\"],\n\t\t\t\t},\n\t\t\t},\n\t\t\tpermissions: {\n\t\t\t\t\"pull-requests\": \"write\",\n\t\t\t},\n\t\t\tsteps: [\n\t\t\t\t{\n\t\t\t\t\tuses: \"actions-ecosystem/action-remove-labels@v1\",\n\t\t\t\t\twith: {\n\t\t\t\t\t\tlabels: \"status: waiting for author\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tif: \"failure()\",\n\t\t\t\t\trun: 'echo \"Don\\'t worry if the previous step failed.\"\\necho \"See https://github.com/actions-ecosystem/action-remove-labels/issues/221.\"\\n',\n\t\t\t\t},\n\t\t\t],\n\t\t}),\n\t\t\"prettier.yml\": createWorkflowFile({\n\t\t\tname: \"Prettier\",\n\t\t\truns: [\"pnpm format --list-different\"],\n\t\t}),\n\t\t\"tsc.yml\": createWorkflowFile({\n\t\t\tname: \"Type Check\",\n\t\t\truns: [\"pnpm tsc\"],\n\t\t}),\n\t\t...(!options.excludeCompliance && {\n\t\t\t\"compliance.yml\": createWorkflowFile({\n\t\t\t\tname: \"Compliance\",\n\t\t\t\ton: {\n\t\t\t\t\tpull_request: {\n\t\t\t\t\t\tbranches: [\"main\"],\n\t\t\t\t\t\ttypes: [\"edited\", \"opened\", \"reopened\", \"synchronize\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tpermissions: {\n\t\t\t\t\t\"pull-requests\": \"write\",\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"mtfoley/pr-compliance-action@main\",\n\t\t\t\t\t\twith: {\n\t\t\t\t\t\t\t\"body-auto-close\": false,\n\t\t\t\t\t\t\t\"ignore-authors\":\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t...(options.excludeAllContributors\n\t\t\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t\t\t: [\"allcontributors\", \"allcontributors[bot]\"]),\n\t\t\t\t\t\t\t\t\t...(options.excludeRenovate\n\t\t\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t\t\t: [\"renovate\", \"renovate[bot]\"]),\n\t\t\t\t\t\t\t\t].join(\"\\n\") || undefined,\n\t\t\t\t\t\t\t\"ignore-team-members\": false,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeAllContributors && {\n\t\t\t\"contributors.yml\": createWorkflowFile({\n\t\t\t\tname: \"Contributors\",\n\t\t\t\ton: {\n\t\t\t\t\tpush: {\n\t\t\t\t\t\tbranches: [\"main\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{ uses: \"actions/checkout@v4\", with: { \"fetch-depth\": 0 } },\n\t\t\t\t\t{ uses: \"./.github/actions/prepare\" },\n\t\t\t\t\t{\n\t\t\t\t\t\tenv: { GITHUB_TOKEN: \"${{ secrets.ACCESS_TOKEN }}\" },\n\t\t\t\t\t\tuses: `JoshuaKGoldberg/all-contributors-auto-action@v0.4.3`,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t\t\"accessibility-alt-text-bot.yml\": createWorkflowFile({\n\t\t\tname: \"Accessibility Alt Text Bot\",\n\t\t\ton: {\n\t\t\t\tissue_comment: {\n\t\t\t\t\ttypes: [\"created\", \"edited\"],\n\t\t\t\t},\n\t\t\t\tissues: {\n\t\t\t\t\ttypes: [\"edited\", \"opened\"],\n\t\t\t\t},\n\t\t\t\tpull_request: {\n\t\t\t\t\ttypes: [\"edited\", \"opened\"],\n\t\t\t\t},\n\t\t\t},\n\t\t\tpermissions: {\n\t\t\t\tissues: \"write\",\n\t\t\t\t\"pull-requests\": \"write\",\n\t\t\t},\n\t\t\tsteps: [\n\t\t\t\t{\n\t\t\t\t\tuses: \"github/accessibility-alt-text-bot@v1.4.0\",\n\t\t\t\t},\n\t\t\t],\n\t\t}),\n\t\t\"lint.yml\": createWorkflowFile({\n\t\t\tname: \"Lint\",\n\t\t\truns: [...(options.bin ? [\"pnpm build --no-dts\"] : []), \"pnpm lint\"],\n\t\t}),\n\t\t...(!options.excludeLintKnip && {\n\t\t\t\"lint-knip.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint Knip\",\n\t\t\t\truns: [\"pnpm lint:knip\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintMd && {\n\t\t\t\"lint-markdown.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint Markdown\",\n\t\t\t\truns: [\"pnpm lint:md\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintPackageJson && {\n\t\t\t\"lint-package-json.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint Package JSON\",\n\t\t\t\truns: [\"pnpm lint:package-json\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintPackages && {\n\t\t\t\"lint-packages.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint Packages\",\n\t\t\t\truns: [\"pnpm lint:packages\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintSpelling && {\n\t\t\t\"lint-spelling.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint spelling\",\n\t\t\t\truns: [\"pnpm lint:spelling\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeReleases && {\n\t\t\t\"post-release.yml\": createWorkflowFile({\n\t\t\t\tname: \"Post Release\",\n\t\t\t\ton: {\n\t\t\t\t\trelease: {\n\t\t\t\t\t\ttypes: [\"published\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{ uses: \"actions/checkout@v4\", with: { \"fetch-depth\": 0 } },\n\t\t\t\t\t{\n\t\t\t\t\t\trun: `echo \"npm_version=$(npm pkg get version | tr -d '\"')\" >> \"$GITHUB_ENV\"`,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"apexskier/github-release-commenter@v1\",\n\t\t\t\t\t\twith: {\n\t\t\t\t\t\t\tGITHUB_TOKEN: \"${{ secrets.GITHUB_TOKEN }}\",\n\t\t\t\t\t\t\t\"comment-template\": `\n\t\t\t\t\t\t\t:tada: This is included in version {release_link} :tada:\n\n\t\t\t\t\t\t\tThe release is available on:\n\n\t\t\t\t\t\t\t* [GitHub releases](https://github.com/${options.owner}/${options.repository}/releases/tag/{release_tag})\n\t\t\t\t\t\t\t* [npm package (@latest dist-tag)](https://www.npmjs.com/package/${options.repository}/v/\\${{ env.npm_version }})\n\n\t\t\t\t\t\t\tCheers! 📦🚀\n\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}),\n\t\t\t\"release.yml\": createWorkflowFile({\n\t\t\t\tconcurrency: {\n\t\t\t\t\tgroup: \"${{ github.workflow }}\",\n\t\t\t\t},\n\t\t\t\tname: \"Release\",\n\t\t\t\ton: {\n\t\t\t\t\tpush: {\n\t\t\t\t\t\tbranches: [\"main\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tpermissions: {\n\t\t\t\t\tcontents: \"write\",\n\t\t\t\t\t\"id-token\": \"write\",\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"actions/checkout@v4\",\n\t\t\t\t\t\twith: {\n\t\t\t\t\t\t\t\"fetch-depth\": 0,\n\t\t\t\t\t\t\tref: \"main\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"./.github/actions/prepare\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\trun: \"pnpm build\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tenv: {\n\t\t\t\t\t\t\tGITHUB_TOKEN: \"${{ secrets.ACCESS_TOKEN }}\",\n\t\t\t\t\t\t\tNPM_TOKEN: \"${{ secrets.NPM_TOKEN }}\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tuses: \"JoshuaKGoldberg/release-it-action@v0.2.2\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeTests && {\n\t\t\t\"test.yml\": createWorkflowFile({\n\t\t\t\tname: \"Test\",\n\t\t\t\tsteps: [\n\t\t\t\t\t{ uses: \"actions/checkout@v4\" },\n\t\t\t\t\t{ uses: \"./.github/actions/prepare\" },\n\t\t\t\t\t{ run: \"pnpm run test --coverage\" },\n\t\t\t\t\t{\n\t\t\t\t\t\tname: \"Codecov\",\n\t\t\t\t\t\tuses: \"codecov/codecov-action@v3\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t};\n}\n"],"mappings":"AAEA,SAAS,0BAA0B;AAE5B,SAAS,gBAAgB,SAAkB;AACjD,SAAO;AAAA,IACN,aAAa,mBAAmB;AAAA,MAC/B,MAAM;AAAA,MACN,MAAM,CAAC,cAAc,qBAAqB;AAAA,IAC3C,CAAC;AAAA,IACD,2BAA2B,mBAAmB;AAAA,MAC7C,MAAM;AAAA,MACN,IAAI;AAAA,QACH,qBAAqB;AAAA,UACpB,OAAO,CAAC,kBAAkB;AAAA,QAC3B;AAAA,MACD;AAAA,MACA,aAAa;AAAA,QACZ,iBAAiB;AAAA,MAClB;AAAA,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AAc;AAAA,cACd,WAAW;AAAA,YACZ;AAAA,YACA,MAAM;AAAA,UACP;AAAA,QACD;AAAA,MACD,CAAC;AAAA,IACF;AAAA,IACA,GAAI,CAAC,QAAQ,gBAAgB;AAAA,MAC5B,YAAY,mBAAmB;AAAA,QAC9B,MAAM;AAAA,QACN,OAAO;AAAA,UACN,EAAE,MAAM,sBAAsB;AAAA,UAC9B,EAAE,MAAM,4BAA4B;AAAA,UACpC,EAAE,KAAK,2BAA2B;AAAA,UAClC;AAAA,YACC,MAAM;AAAA,YACN,MAAM;AAAA,UACP;AAAA,QACD;AAAA,MACD,CAAC;AAAA,IACF;AAAA,EACD;AACD;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../../../src/steps/writing/creation/dotGitHub/createWorkflows.ts"],"sourcesContent":["/* spellchecker: disable */\nimport { Options } from \"../../../../shared/types.js\";\nimport { createWorkflowFile } from \"./createWorkflowFile.js\";\n\nexport function createWorkflows(options: Options) {\n\treturn {\n\t\t\"build.yml\": createWorkflowFile({\n\t\t\tname: \"Build\",\n\t\t\truns: [\"pnpm build\", \"node ./lib/index.js\"],\n\t\t}),\n\t\t\"pr-review-requested.yml\": createWorkflowFile({\n\t\t\tname: \"PR Review Requested\",\n\t\t\ton: {\n\t\t\t\tpull_request_target: {\n\t\t\t\t\ttypes: [\"review_requested\"],\n\t\t\t\t},\n\t\t\t},\n\t\t\tpermissions: {\n\t\t\t\t\"pull-requests\": \"write\",\n\t\t\t},\n\t\t\tsteps: [\n\t\t\t\t{\n\t\t\t\t\tuses: \"actions-ecosystem/action-remove-labels@v1\",\n\t\t\t\t\twith: {\n\t\t\t\t\t\tlabels: \"status: waiting for author\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tif: \"failure()\",\n\t\t\t\t\trun: 'echo \"Don\\'t worry if the previous step failed.\"\\necho \"See https://github.com/actions-ecosystem/action-remove-labels/issues/221.\"\\n',\n\t\t\t\t},\n\t\t\t],\n\t\t}),\n\t\t\"prettier.yml\": createWorkflowFile({\n\t\t\tname: \"Prettier\",\n\t\t\truns: [\"pnpm format --list-different\"],\n\t\t}),\n\t\t\"tsc.yml\": createWorkflowFile({\n\t\t\tname: \"Type Check\",\n\t\t\truns: [\"pnpm tsc\"],\n\t\t}),\n\t\t...(!options.excludeCompliance && {\n\t\t\t\"compliance.yml\": createWorkflowFile({\n\t\t\t\tname: \"Compliance\",\n\t\t\t\ton: {\n\t\t\t\t\tpull_request: {\n\t\t\t\t\t\tbranches: [\"main\"],\n\t\t\t\t\t\ttypes: [\"edited\", \"opened\", \"reopened\", \"synchronize\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tpermissions: {\n\t\t\t\t\t\"pull-requests\": \"write\",\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"mtfoley/pr-compliance-action@main\",\n\t\t\t\t\t\twith: {\n\t\t\t\t\t\t\t\"body-auto-close\": false,\n\t\t\t\t\t\t\t\"ignore-authors\":\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t...(options.excludeAllContributors\n\t\t\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t\t\t: [\"allcontributors\", \"allcontributors[bot]\"]),\n\t\t\t\t\t\t\t\t\t...(options.excludeRenovate\n\t\t\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t\t\t: [\"renovate\", \"renovate[bot]\"]),\n\t\t\t\t\t\t\t\t].join(\"\\n\") || undefined,\n\t\t\t\t\t\t\t\"ignore-team-members\": false,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeAllContributors && {\n\t\t\t\"contributors.yml\": createWorkflowFile({\n\t\t\t\tname: \"Contributors\",\n\t\t\t\ton: {\n\t\t\t\t\tpush: {\n\t\t\t\t\t\tbranches: [\"main\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{ uses: \"actions/checkout@v4\", with: { \"fetch-depth\": 0 } },\n\t\t\t\t\t{ uses: \"./.github/actions/prepare\" },\n\t\t\t\t\t{\n\t\t\t\t\t\tenv: { GITHUB_TOKEN: \"${{ secrets.ACCESS_TOKEN }}\" },\n\t\t\t\t\t\tuses: `JoshuaKGoldberg/all-contributors-auto-action@v0.4.3`,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t\t\"accessibility-alt-text-bot.yml\": createWorkflowFile({\n\t\t\tname: \"Accessibility Alt Text Bot\",\n\t\t\ton: {\n\t\t\t\tissue_comment: {\n\t\t\t\t\ttypes: [\"created\", \"edited\"],\n\t\t\t\t},\n\t\t\t\tissues: {\n\t\t\t\t\ttypes: [\"edited\", \"opened\"],\n\t\t\t\t},\n\t\t\t\tpull_request: {\n\t\t\t\t\ttypes: [\"edited\", \"opened\"],\n\t\t\t\t},\n\t\t\t},\n\t\t\tpermissions: {\n\t\t\t\tissues: \"write\",\n\t\t\t\t\"pull-requests\": \"write\",\n\t\t\t},\n\t\t\tsteps: [\n\t\t\t\t{\n\t\t\t\t\tuses: \"github/accessibility-alt-text-bot@v1.4.0\",\n\t\t\t\t},\n\t\t\t],\n\t\t}),\n\t\t\"lint.yml\": createWorkflowFile({\n\t\t\tname: \"Lint\",\n\t\t\truns: [...(options.bin ? [\"pnpm build --no-dts\"] : []), \"pnpm lint\"],\n\t\t}),\n\t\t...(!options.excludeLintKnip && {\n\t\t\t\"lint-knip.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint Knip\",\n\t\t\t\truns: [\"pnpm lint:knip\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintMd && {\n\t\t\t\"lint-markdown.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint Markdown\",\n\t\t\t\truns: [\"pnpm lint:md\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintPackages && {\n\t\t\t\"lint-packages.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint Packages\",\n\t\t\t\truns: [\"pnpm lint:packages\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintSpelling && {\n\t\t\t\"lint-spelling.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint spelling\",\n\t\t\t\truns: [\"pnpm lint:spelling\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeReleases && {\n\t\t\t\"post-release.yml\": createWorkflowFile({\n\t\t\t\tname: \"Post Release\",\n\t\t\t\ton: {\n\t\t\t\t\trelease: {\n\t\t\t\t\t\ttypes: [\"published\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{ uses: \"actions/checkout@v4\", with: { \"fetch-depth\": 0 } },\n\t\t\t\t\t{\n\t\t\t\t\t\trun: `echo \"npm_version=$(npm pkg get version | tr -d '\"')\" >> \"$GITHUB_ENV\"`,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"apexskier/github-release-commenter@v1\",\n\t\t\t\t\t\twith: {\n\t\t\t\t\t\t\tGITHUB_TOKEN: \"${{ secrets.GITHUB_TOKEN }}\",\n\t\t\t\t\t\t\t\"comment-template\": `\n\t\t\t\t\t\t\t:tada: This is included in version {release_link} :tada:\n\n\t\t\t\t\t\t\tThe release is available on:\n\n\t\t\t\t\t\t\t* [GitHub releases](https://github.com/${options.owner}/${options.repository}/releases/tag/{release_tag})\n\t\t\t\t\t\t\t* [npm package (@latest dist-tag)](https://www.npmjs.com/package/${options.repository}/v/\\${{ env.npm_version }})\n\n\t\t\t\t\t\t\tCheers! 📦🚀\n\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}),\n\t\t\t\"release.yml\": createWorkflowFile({\n\t\t\t\tconcurrency: {\n\t\t\t\t\tgroup: \"${{ github.workflow }}\",\n\t\t\t\t},\n\t\t\t\tname: \"Release\",\n\t\t\t\ton: {\n\t\t\t\t\tpush: {\n\t\t\t\t\t\tbranches: [\"main\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tpermissions: {\n\t\t\t\t\tcontents: \"write\",\n\t\t\t\t\t\"id-token\": \"write\",\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"actions/checkout@v4\",\n\t\t\t\t\t\twith: {\n\t\t\t\t\t\t\t\"fetch-depth\": 0,\n\t\t\t\t\t\t\tref: \"main\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"./.github/actions/prepare\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\trun: \"pnpm build\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tenv: {\n\t\t\t\t\t\t\tGITHUB_TOKEN: \"${{ secrets.ACCESS_TOKEN }}\",\n\t\t\t\t\t\t\tNPM_TOKEN: \"${{ secrets.NPM_TOKEN }}\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tuses: \"JoshuaKGoldberg/release-it-action@v0.2.2\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeTests && {\n\t\t\t\"test.yml\": createWorkflowFile({\n\t\t\t\tname: \"Test\",\n\t\t\t\tsteps: [\n\t\t\t\t\t{ uses: \"actions/checkout@v4\" },\n\t\t\t\t\t{ uses: \"./.github/actions/prepare\" },\n\t\t\t\t\t{ run: \"pnpm run test --coverage\" },\n\t\t\t\t\t{\n\t\t\t\t\t\tname: \"Codecov\",\n\t\t\t\t\t\tuses: \"codecov/codecov-action@v3\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t};\n}\n"],"mappings":"AAEA,SAAS,0BAA0B;AAE5B,SAAS,gBAAgB,SAAkB;AACjD,SAAO;AAAA,IACN,aAAa,mBAAmB;AAAA,MAC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A,UACA;AAAA,YACC,MAAM;AAAA,UACP;AAAA,UACA;AAAA,YACC,KAAK;AAAA,UACN;AAAA,UACA;AAAA,YACC,KAAK;AAAA,cACJ,cAAc;AAAA,cACd,WAAW;AAAA,YACZ;AAAA,YACA,MAAM;AAAA,UACP;AAAA,QACD;AAAA,MACD,CAAC;AAAA,IACF;AAAA,IACA,GAAI,CAAC,QAAQ,gBAAgB;AAAA,MAC5B,YAAY,mBAAmB;AAAA,QAC9B,MAAM;AAAA,QACN,OAAO;AAAA,UACN,EAAE,MAAM,sBAAsB;AAAA,UAC9B,EAAE,MAAM,4BAA4B;AAAA,UACpC,EAAE,KAAK,2BAA2B;AAAA,UAClC;AAAA,YACC,MAAM;AAAA,YACN,MAAM;AAAA,UACP;AAAA,QACD;AAAA,MACD,CAAC;AAAA,IACF;AAAA,EACD;AACD;","names":[]}
|
|
@@ -28,7 +28,6 @@ declare function createDotGitHub(options: Options): Promise<{
|
|
|
28
28
|
"release.yml"?: string | undefined;
|
|
29
29
|
"lint-spelling.yml"?: string | undefined;
|
|
30
30
|
"lint-packages.yml"?: string | undefined;
|
|
31
|
-
"lint-package-json.yml"?: string | undefined;
|
|
32
31
|
"lint-markdown.yml"?: string | undefined;
|
|
33
32
|
"lint-knip.yml"?: string | undefined;
|
|
34
33
|
"accessibility-alt-text-bot.yml": string;
|
|
@@ -15,11 +15,9 @@ declare function createRootFiles(options: Options): Promise<{
|
|
|
15
15
|
".nvmrc": string;
|
|
16
16
|
".prettierignore": string;
|
|
17
17
|
".prettierrc.json": string;
|
|
18
|
-
".npmpackagejsonlintrc.json"?: string | undefined;
|
|
19
18
|
".markdownlint.json"?: string | undefined;
|
|
20
19
|
".markdownlintignore"?: string | undefined;
|
|
21
20
|
".all-contributorsrc": string;
|
|
22
|
-
".eslintignore": string;
|
|
23
21
|
".eslintrc.cjs": string;
|
|
24
22
|
".gitignore": string;
|
|
25
23
|
}>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createDotESLintignore } from "./createDotESLintignore.js";
|
|
2
1
|
import { createDotGitignore } from "./createDotGitignore.js";
|
|
3
2
|
import { createESLintRC } from "./createESLintRC.js";
|
|
4
3
|
import { createTsupConfig } from "./createTsupConfig.js";
|
|
@@ -9,7 +8,6 @@ import { writePackageJson } from "./writePackageJson.js";
|
|
|
9
8
|
async function createRootFiles(options) {
|
|
10
9
|
return {
|
|
11
10
|
".all-contributorsrc": await writeAllContributorsRC(options),
|
|
12
|
-
".eslintignore": createDotESLintignore(options),
|
|
13
11
|
".eslintrc.cjs": await createESLintRC(options),
|
|
14
12
|
".gitignore": createDotGitignore(options),
|
|
15
13
|
...!options.excludeLintMd && {
|
|
@@ -25,15 +23,6 @@ async function createRootFiles(options) {
|
|
|
25
23
|
"node_modules/"
|
|
26
24
|
])
|
|
27
25
|
},
|
|
28
|
-
...!options.excludeLintPackageJson && {
|
|
29
|
-
".npmpackagejsonlintrc.json": await formatJson({
|
|
30
|
-
extends: "npm-package-json-lint-config-default",
|
|
31
|
-
rules: {
|
|
32
|
-
"require-description": "error",
|
|
33
|
-
"require-license": "error"
|
|
34
|
-
}
|
|
35
|
-
})
|
|
36
|
-
},
|
|
37
26
|
".nvmrc": `20.11.0
|
|
38
27
|
`,
|
|
39
28
|
".prettierignore": formatIgnoreFile([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/steps/writing/creation/rootFiles.ts"],"sourcesContent":["import { Options } from \"../../../shared/types.js\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../src/steps/writing/creation/rootFiles.ts"],"sourcesContent":["import { Options } from \"../../../shared/types.js\";\nimport { createDotGitignore } from \"./createDotGitignore.js\";\nimport { createESLintRC } from \"./createESLintRC.js\";\nimport { createTsupConfig } from \"./createTsupConfig.js\";\nimport { formatIgnoreFile } from \"./formatters/formatIgnoreFile.js\";\nimport { formatJson } from \"./formatters/formatJson.js\";\nimport { writeAllContributorsRC } from \"./writeAllContributorsRC.js\";\nimport { writePackageJson } from \"./writePackageJson.js\";\n\nexport async function createRootFiles(options: Options) {\n\treturn {\n\t\t\".all-contributorsrc\": await writeAllContributorsRC(options),\n\t\t\".eslintrc.cjs\": await createESLintRC(options),\n\t\t\".gitignore\": createDotGitignore(options),\n\t\t...(!options.excludeLintMd && {\n\t\t\t\".markdownlint.json\": await formatJson({\n\t\t\t\textends: \"markdownlint/style/prettier\",\n\t\t\t\t\"first-line-h1\": false,\n\t\t\t\t\"no-inline-html\": false,\n\t\t\t}),\n\t\t\t\".markdownlintignore\": formatIgnoreFile([\n\t\t\t\t\".github/CODE_OF_CONDUCT.md\",\n\t\t\t\t\"CHANGELOG.md\",\n\t\t\t\t\"lib/\",\n\t\t\t\t\"node_modules/\",\n\t\t\t]),\n\t\t}),\n\t\t\".nvmrc\": `20.11.0\\n`,\n\t\t\".prettierignore\": formatIgnoreFile([\n\t\t\t...(options.excludeAllContributors ? [] : [\".all-contributorsrc\"]),\n\t\t\t...(options.excludeTests ? [] : [\"coverage/\"]),\n\t\t\t\"lib/\",\n\t\t\t\"pnpm-lock.yaml\",\n\t\t]),\n\t\t\".prettierrc.json\": await formatJson({\n\t\t\t$schema: \"http://json.schemastore.org/prettierrc\",\n\t\t\toverrides: [\n\t\t\t\t{\n\t\t\t\t\tfiles: \".nvmrc\",\n\t\t\t\t\toptions: { parser: \"yaml\" },\n\t\t\t\t},\n\t\t\t],\n\t\t\tplugins: [\"prettier-plugin-curly\", \"prettier-plugin-packagejson\"],\n\t\t\tuseTabs: true,\n\t\t}),\n\t\t...(!options.excludeReleases && {\n\t\t\t\".release-it.json\": await formatJson({\n\t\t\t\tgit: {\n\t\t\t\t\tcommitMessage: \"chore: release v${version}\",\n\t\t\t\t\trequireCommits: true,\n\t\t\t\t},\n\t\t\t\tgithub: {\n\t\t\t\t\tautoGenerate: true,\n\t\t\t\t\trelease: true,\n\t\t\t\t\treleaseName: \"v${version}\",\n\t\t\t\t},\n\t\t\t\tnpm: {\n\t\t\t\t\tpublishArgs: [`--access ${options.access}`, \"--provenance\"],\n\t\t\t\t},\n\t\t\t\tplugins: {\n\t\t\t\t\t\"@release-it/conventional-changelog\": {\n\t\t\t\t\t\tinfile: \"CHANGELOG.md\",\n\t\t\t\t\t\tpreset: \"angular\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}),\n\t\t}),\n\t\t\"LICENSE.md\": `# MIT License\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n`,\n\t\t...(!options.excludeLintSpelling && {\n\t\t\t\"cspell.json\": await formatJson({\n\t\t\t\tdictionaries: [\"typescript\"],\n\t\t\t\tignorePaths: [\n\t\t\t\t\t\".github\",\n\t\t\t\t\t\"CHANGELOG.md\",\n\t\t\t\t\t...(options.excludeTests ? [] : [\"coverage\"]),\n\t\t\t\t\t\"lib\",\n\t\t\t\t\t\"node_modules\",\n\t\t\t\t\t\"pnpm-lock.yaml\",\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintKnip && {\n\t\t\t\"knip.json\": await formatJson({\n\t\t\t\t$schema: \"https://unpkg.com/knip@latest/schema.json\",\n\t\t\t\tentry: [\"src/index.ts!\"],\n\t\t\t\tignoreExportsUsedInFile: {\n\t\t\t\t\tinterface: true,\n\t\t\t\t\ttype: true,\n\t\t\t\t},\n\t\t\t\tproject: [\"src/**/*.ts!\"],\n\t\t\t}),\n\t\t}),\n\t\t\"package.json\": await writePackageJson(options),\n\t\t\"tsconfig.eslint.json\": await formatJson({\n\t\t\textends: \"./tsconfig.json\",\n\t\t\tinclude: [\".\"],\n\t\t}),\n\t\t\"tsconfig.json\": await formatJson({\n\t\t\tcompilerOptions: {\n\t\t\t\tdeclaration: true,\n\t\t\t\tdeclarationMap: true,\n\t\t\t\tesModuleInterop: true,\n\t\t\t\tmodule: \"NodeNext\",\n\t\t\t\tmoduleResolution: \"NodeNext\",\n\t\t\t\tnoEmit: true,\n\t\t\t\toutDir: \"lib\",\n\t\t\t\tresolveJsonModule: true,\n\t\t\t\tskipLibCheck: true,\n\t\t\t\tsourceMap: true,\n\t\t\t\tstrict: true,\n\t\t\t\ttarget: \"ES2022\",\n\t\t\t},\n\t\t\tinclude: [\"src\"],\n\t\t}),\n\t\t\"tsup.config.ts\": await createTsupConfig(options),\n\t\t...(!options.excludeTests && {\n\t\t\t\"vitest.config.ts\": `import { defineConfig } from \"vitest/config\";\n\nexport default defineConfig({\n\ttest: {\n\t\tclearMocks: true,\n\t\tcoverage: {\n\t\t\tall: true,\n\t\t\texclude: [\"lib\"],\n\t\t\tinclude: [\"src\"],\n\t\t\treporter: [\"html\", \"lcov\"],\n\t\t},\n\t\texclude: [\"lib\", \"node_modules\"],\n\t\tsetupFiles: [\"console-fail-test/setup\"],\n\t},\n});\n`,\n\t\t}),\n\t};\n}\n"],"mappings":"AACA,SAAS,0BAA0B;AACnC,SAAS,sBAAsB;AAC/B,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,kBAAkB;AAC3B,SAAS,8BAA8B;AACvC,SAAS,wBAAwB;AAEjC,eA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MAC5B,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAgBrB;AAAA,EACD;AACD;","names":[]}
|
|
@@ -82,9 +82,6 @@ async function writePackageJson(options) {
|
|
|
82
82
|
...!options.excludeLintMd && {
|
|
83
83
|
"lint:md": 'markdownlint "**/*.md" ".github/**/*.md" --rules sentences-per-line'
|
|
84
84
|
},
|
|
85
|
-
...!options.excludeLintPackageJson && {
|
|
86
|
-
"lint:package-json": "npmPkgJsonLint ."
|
|
87
|
-
},
|
|
88
85
|
...!options.excludeLintPackages && {
|
|
89
86
|
"lint:packages": "pnpm dedupe --check"
|
|
90
87
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/steps/writing/creation/writePackageJson.ts"],"sourcesContent":["import { readFileSafeAsJson } from \"../../../shared/readFileSafeAsJson.js\";\nimport { Options, PartialPackageData } from \"../../../shared/types.js\";\nimport { formatJson } from \"./formatters/formatJson.js\";\n\nconst devDependenciesToRemove = [\n\t\"@babel/core\",\n\t\"@babel/preset-env\",\n\t\"@babel/preset-react\",\n\t\"@babel/preset-typescript\",\n\t\"@swc/jest\",\n\t\"@vitest/coverage-istanbul\",\n\t\"ava\",\n\t\"babel-jest\",\n\t\"commitlint\",\n\t\"cson-parser\",\n\t\"esbuild\",\n\t\"eslint-config-prettier\",\n\t\"eslint-plugin-import\",\n\t\"eslint-plugin-jest\",\n\t\"eslint-plugin-prettier\",\n\t\"eslint-plugin-simple-import-sort\",\n\t\"eslint-plugin-typescript-sort-keys\",\n\t\"jasmine\",\n\t\"jest\",\n\t\"mocha\",\n\t\"npm-run-all\",\n\t\"pnpm-deduplicate\",\n\t\"pretty-quick\",\n\t\"ts-jest\",\n];\n\nexport async function writePackageJson(options: Options) {\n\tconst existingPackageJson =\n\t\t((await readFileSafeAsJson(\n\t\t\t\"./package.json\",\n\t\t)) as PartialPackageData | null) ?? {};\n\n\treturn await formatJson({\n\t\t// If we didn't already have a version, set it to 0.0.0\n\t\tversion: \"0.0.0\",\n\n\t\t// To start, copy over all existing package fields (e.g. \"dependencies\")\n\t\t...existingPackageJson,\n\n\t\tauthor: { email: options.email.npm, name: options.author },\n\t\tbin: options.bin,\n\t\tdescription: options.description,\n\t\tkeywords: options.keywords?.length\n\t\t\t? options.keywords.flatMap((keyword) => keyword.split(/ /))\n\t\t\t: undefined,\n\n\t\t// We copy all existing dev dependencies except those we know are not used anymore\n\t\tdevDependencies: copyDevDependencies(existingPackageJson),\n\n\t\t// Remove fields we know we don't want, such as old or redundant configs\n\t\teslintConfig: undefined,\n\t\thusky: undefined,\n\t\tprettierConfig: undefined,\n\t\ttypes: undefined,\n\n\t\t// The rest of the fields are ones we know from our template\n\t\tengines: {\n\t\t\tnode: \">=18\",\n\t\t},\n\t\tfiles: [\n\t\t\toptions.bin?.replace(/^\\.\\//, \"\"),\n\t\t\t\"lib/\",\n\t\t\t\"package.json\",\n\t\t\t\"LICENSE.md\",\n\t\t\t\"README.md\",\n\t\t].filter(Boolean),\n\t\tlicense: \"MIT\",\n\t\t\"lint-staged\": {\n\t\t\t\"*\": \"prettier --ignore-unknown --write\",\n\t\t},\n\t\tmain: \"./lib/index.js\",\n\t\tname: options.repository,\n\t\tpackageManager: \"pnpm@8.14.1\",\n\t\tpublishConfig: {\n\t\t\tprovenance: true,\n\t\t},\n\t\trepository: {\n\t\t\ttype: \"git\",\n\t\t\turl: `https://github.com/${options.owner}/${options.repository}`,\n\t\t},\n\t\tscripts: {\n\t\t\t...existingPackageJson.scripts,\n\t\t\tbuild: \"tsup\",\n\t\t\tformat: \"prettier .\",\n\t\t\tlint: \"eslint . .*js --max-warnings 0\",\n\t\t\t...(!options.excludeLintKnip && {\n\t\t\t\t\"lint:knip\": \"knip\",\n\t\t\t}),\n\t\t\t...(!options.excludeLintMd && {\n\t\t\t\t\"lint:md\":\n\t\t\t\t\t'markdownlint \"**/*.md\" \".github/**/*.md\" --rules sentences-per-line',\n\t\t\t}),\n\t\t\t...(!options.
|
|
1
|
+
{"version":3,"sources":["../../../../src/steps/writing/creation/writePackageJson.ts"],"sourcesContent":["import { readFileSafeAsJson } from \"../../../shared/readFileSafeAsJson.js\";\nimport { Options, PartialPackageData } from \"../../../shared/types.js\";\nimport { formatJson } from \"./formatters/formatJson.js\";\n\nconst devDependenciesToRemove = [\n\t\"@babel/core\",\n\t\"@babel/preset-env\",\n\t\"@babel/preset-react\",\n\t\"@babel/preset-typescript\",\n\t\"@swc/jest\",\n\t\"@vitest/coverage-istanbul\",\n\t\"ava\",\n\t\"babel-jest\",\n\t\"commitlint\",\n\t\"cson-parser\",\n\t\"esbuild\",\n\t\"eslint-config-prettier\",\n\t\"eslint-plugin-import\",\n\t\"eslint-plugin-jest\",\n\t\"eslint-plugin-prettier\",\n\t\"eslint-plugin-simple-import-sort\",\n\t\"eslint-plugin-typescript-sort-keys\",\n\t\"jasmine\",\n\t\"jest\",\n\t\"mocha\",\n\t\"npm-run-all\",\n\t\"pnpm-deduplicate\",\n\t\"pretty-quick\",\n\t\"ts-jest\",\n];\n\nexport async function writePackageJson(options: Options) {\n\tconst existingPackageJson =\n\t\t((await readFileSafeAsJson(\n\t\t\t\"./package.json\",\n\t\t)) as PartialPackageData | null) ?? {};\n\n\treturn await formatJson({\n\t\t// If we didn't already have a version, set it to 0.0.0\n\t\tversion: \"0.0.0\",\n\n\t\t// To start, copy over all existing package fields (e.g. \"dependencies\")\n\t\t...existingPackageJson,\n\n\t\tauthor: { email: options.email.npm, name: options.author },\n\t\tbin: options.bin,\n\t\tdescription: options.description,\n\t\tkeywords: options.keywords?.length\n\t\t\t? options.keywords.flatMap((keyword) => keyword.split(/ /))\n\t\t\t: undefined,\n\n\t\t// We copy all existing dev dependencies except those we know are not used anymore\n\t\tdevDependencies: copyDevDependencies(existingPackageJson),\n\n\t\t// Remove fields we know we don't want, such as old or redundant configs\n\t\teslintConfig: undefined,\n\t\thusky: undefined,\n\t\tprettierConfig: undefined,\n\t\ttypes: undefined,\n\n\t\t// The rest of the fields are ones we know from our template\n\t\tengines: {\n\t\t\tnode: \">=18\",\n\t\t},\n\t\tfiles: [\n\t\t\toptions.bin?.replace(/^\\.\\//, \"\"),\n\t\t\t\"lib/\",\n\t\t\t\"package.json\",\n\t\t\t\"LICENSE.md\",\n\t\t\t\"README.md\",\n\t\t].filter(Boolean),\n\t\tlicense: \"MIT\",\n\t\t\"lint-staged\": {\n\t\t\t\"*\": \"prettier --ignore-unknown --write\",\n\t\t},\n\t\tmain: \"./lib/index.js\",\n\t\tname: options.repository,\n\t\tpackageManager: \"pnpm@8.14.1\",\n\t\tpublishConfig: {\n\t\t\tprovenance: true,\n\t\t},\n\t\trepository: {\n\t\t\ttype: \"git\",\n\t\t\turl: `https://github.com/${options.owner}/${options.repository}`,\n\t\t},\n\t\tscripts: {\n\t\t\t...existingPackageJson.scripts,\n\t\t\tbuild: \"tsup\",\n\t\t\tformat: \"prettier .\",\n\t\t\tlint: \"eslint . .*js --max-warnings 0\",\n\t\t\t...(!options.excludeLintKnip && {\n\t\t\t\t\"lint:knip\": \"knip\",\n\t\t\t}),\n\t\t\t...(!options.excludeLintMd && {\n\t\t\t\t\"lint:md\":\n\t\t\t\t\t'markdownlint \"**/*.md\" \".github/**/*.md\" --rules sentences-per-line',\n\t\t\t}),\n\t\t\t...(!options.excludeLintPackages && {\n\t\t\t\t\"lint:packages\": \"pnpm dedupe --check\",\n\t\t\t}),\n\t\t\t...(!options.excludeLintSpelling && {\n\t\t\t\t\"lint:spelling\": 'cspell \"**\" \".github/**/*\"',\n\t\t\t}),\n\t\t\tprepare: \"husky install\",\n\t\t\t...(!options.excludeReleases && {\n\t\t\t\t\"should-semantic-release\": \"should-semantic-release --verbose\",\n\t\t\t}),\n\t\t\t...(!options.excludeReleases && { test: \"vitest\" }),\n\t\t\ttsc: \"tsc\",\n\t\t},\n\t\ttype: \"module\",\n\t});\n}\n\nfunction copyDevDependencies(existingPackageJson: object) {\n\tconst devDependencies =\n\t\t\"devDependencies\" in existingPackageJson\n\t\t\t? (existingPackageJson.devDependencies as Record<string, string>)\n\t\t\t: {};\n\n\tfor (const devDependencyToRemove of devDependenciesToRemove) {\n\t\t// eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n\t\tdelete devDependencies[devDependencyToRemove];\n\t}\n\n\treturn devDependencies;\n}\n"],"mappings":"AAAA,SAAS,0BAA0B;AAEnC,SAAS,kBAAkB;AAE3B,MAAM,0BAA0B;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAEA,eAAsB,iBAAiB,SAAkB;AACxD,QAAM,sBACH,MAAM;AAAA,IACP;AAAA,EACD,KAAoC,CAAC;AAEtC,SAAO,MAAM,WAAW;AAAA;AAAA,IAEvB,SAAS;AAAA;AAAA,IAGT,GAAG;AAAA,IAEH,QAAQ,EAAE,OAAO,QAAQ,MAAM,KAAK,MAAM,QAAQ,OAAO;AAAA,IACzD,KAAK,QAAQ;AAAA,IACb,aAAa,QAAQ;AAAA,IACrB,UAAU,QAAQ,UAAU,SACzB,QAAQ,SAAS,QAAQ,CAAC,YAAY,QAAQ,MAAM,GAAG,CAAC,IACxD;AAAA;AAAA,IAGH,iBAAiB,oBAAoB,mBAAmB;AAAA;AAAA,IAGxD,cAAc;AAAA,IACd,OAAO;AAAA,IACP,gBAAgB;AAAA,IAChB,OAAO;AAAA;AAAA,IAGP,SAAS;AAAA,MACR,MAAM;AAAA,IACP;AAAA,IACA,OAAO;AAAA,MACN,QAAQ,KAAK,QAAQ,SAAS,EAAE;AAAA,MAChC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD,EAAE,OAAO,OAAO;AAAA,IAChB,SAAS;AAAA,IACT,eAAe;AAAA,MACd,KAAK;AAAA,IACN;AAAA,IACA,MAAM;AAAA,IACN,MAAM,QAAQ;AAAA,IACd,gBAAgB;AAAA,IAChB,eAAe;AAAA,MACd,YAAY;AAAA,IACb;AAAA,IACA,YAAY;AAAA,MACX,MAAM;AAAA,MACN,KAAK,sBAAsB,QAAQ,KAAK,IAAI,QAAQ,UAAU;AAAA,IAC/D;AAAA,IACA,SAAS;AAAA,MACR,GAAG,oBAAoB;AAAA,MACvB,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,GAAI,CAAC,QAAQ,mBAAmB;AAAA,QAC/B,aAAa;AAAA,MACd;AAAA,MACA,GAAI,CAAC,QAAQ,iBAAiB;AAAA,QAC7B,WACC;AAAA,MACF;AAAA,MACA,GAAI,CAAC,QAAQ,uBAAuB;AAAA,QACnC,iBAAiB;AAAA,MAClB;AAAA,MACA,GAAI,CAAC,QAAQ,uBAAuB;AAAA,QACnC,iBAAiB;AAAA,MAClB;AAAA,MACA,SAAS;AAAA,MACT,GAAI,CAAC,QAAQ,mBAAmB;AAAA,QAC/B,2BAA2B;AAAA,MAC5B;AAAA,MACA,GAAI,CAAC,QAAQ,mBAAmB,EAAE,MAAM,SAAS;AAAA,MACjD,KAAK;AAAA,IACN;AAAA,IACA,MAAM;AAAA,EACP,CAAC;AACF;AAEA,SAAS,oBAAoB,qBAA6B;AACzD,QAAM,kBACL,qBAAqB,sBACjB,oBAAoB,kBACrB,CAAC;AAEL,aAAW,yBAAyB,yBAAyB;AAE5D,WAAO,gBAAgB,qBAAqB;AAAA,EAC7C;AAEA,SAAO;AACR;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-typescript-app",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.56.0",
|
|
4
4
|
"description": "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 💝",
|
|
5
|
-
"repository":
|
|
6
|
-
"type": "git",
|
|
7
|
-
"url": "https://github.com/JoshuaKGoldberg/create-typescript-app"
|
|
8
|
-
},
|
|
5
|
+
"repository": "JoshuaKGoldberg/create-typescript-app",
|
|
9
6
|
"license": "MIT",
|
|
10
7
|
"author": {
|
|
11
8
|
"name": "Josh Goldberg",
|
|
@@ -28,7 +25,6 @@
|
|
|
28
25
|
"lint": "eslint . .*js --max-warnings 0",
|
|
29
26
|
"lint:knip": "knip",
|
|
30
27
|
"lint:md": "markdownlint \"**/*.md\" \".github/**/*.md\" --rules sentences-per-line",
|
|
31
|
-
"lint:package-json": "npmPkgJsonLint .",
|
|
32
28
|
"lint:packages": "pnpm dedupe --check",
|
|
33
29
|
"lint:spelling": "cspell \"**\" \".github/**/*\"",
|
|
34
30
|
"prepare": "husky install",
|
|
@@ -59,7 +55,7 @@
|
|
|
59
55
|
"rimraf": "^5.0.5",
|
|
60
56
|
"title-case": "^4.1.2",
|
|
61
57
|
"zod": "^3.22.4",
|
|
62
|
-
"zod-validation-error": "^
|
|
58
|
+
"zod-validation-error": "^3.0.0"
|
|
63
59
|
},
|
|
64
60
|
"devDependencies": {
|
|
65
61
|
"@octokit/request-error": "^5.0.1",
|
|
@@ -84,6 +80,7 @@
|
|
|
84
80
|
"eslint-plugin-markdown": "^3.0.1",
|
|
85
81
|
"eslint-plugin-n": "^16.3.1",
|
|
86
82
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
83
|
+
"eslint-plugin-package-json": "^0.10.0",
|
|
87
84
|
"eslint-plugin-perfectionist": "^2.5.0",
|
|
88
85
|
"eslint-plugin-regexp": "^2.1.2",
|
|
89
86
|
"eslint-plugin-vitest": "^0.3.10",
|
|
@@ -91,12 +88,10 @@
|
|
|
91
88
|
"globby": "^14.0.0",
|
|
92
89
|
"husky": "^8.0.3",
|
|
93
90
|
"jsonc-eslint-parser": "^2.4.0",
|
|
94
|
-
"knip": "
|
|
91
|
+
"knip": "4.0.2",
|
|
95
92
|
"lint-staged": "^15.2.0",
|
|
96
93
|
"markdownlint": "^0.33.0",
|
|
97
94
|
"markdownlint-cli": "^0.38.0",
|
|
98
|
-
"npm-package-json-lint": "^7.1.0",
|
|
99
|
-
"npm-package-json-lint-config-default": "^6.0.0",
|
|
100
95
|
"prettier-plugin-curly": "^0.1.3",
|
|
101
96
|
"prettier-plugin-packagejson": "^2.4.7",
|
|
102
97
|
"release-it": "^17.0.0",
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { formatIgnoreFile } from "./formatters/formatIgnoreFile.js";
|
|
2
|
-
function createDotESLintignore(options) {
|
|
3
|
-
return formatIgnoreFile(
|
|
4
|
-
[
|
|
5
|
-
"!.*",
|
|
6
|
-
...options.excludeTests ? [] : ["coverage"],
|
|
7
|
-
"lib",
|
|
8
|
-
"node_modules",
|
|
9
|
-
"pnpm-lock.yaml"
|
|
10
|
-
].filter(Boolean)
|
|
11
|
-
);
|
|
12
|
-
}
|
|
13
|
-
export {
|
|
14
|
-
createDotESLintignore
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=createDotESLintignore.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/steps/writing/creation/createDotESLintignore.ts"],"sourcesContent":["import { Options } from \"../../../shared/types.js\";\nimport { formatIgnoreFile } from \"./formatters/formatIgnoreFile.js\";\n\nexport function createDotESLintignore(options: Pick<Options, \"excludeTests\">) {\n\treturn formatIgnoreFile(\n\t\t[\n\t\t\t\"!.*\",\n\t\t\t...(options.excludeTests ? [] : [\"coverage\"]),\n\t\t\t\"lib\",\n\t\t\t\"node_modules\",\n\t\t\t\"pnpm-lock.yaml\",\n\t\t].filter(Boolean),\n\t);\n}\n"],"mappings":"AACA,SAAS,wBAAwB;AAE1B,SAAS,sBAAsB,SAAwC;AAC7E,SAAO;AAAA,IACN;AAAA,MACC;AAAA,MACA,GAAI,QAAQ,eAAe,CAAC,IAAI,CAAC,UAAU;AAAA,MAC3C;AAAA,MACA;AAAA,MACA;AAAA,IACD,EAAE,OAAO,OAAO;AAAA,EACjB;AACD;","names":[]}
|