create-typescript-app 2.45.0 → 2.46.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/base.d.ts +170 -167
- package/lib/base.d.ts.map +1 -0
- package/lib/base.js +132 -204
- package/lib/base.js.map +1 -0
- package/lib/blocks/actions/resolveUses.d.ts +5 -2
- package/lib/blocks/actions/resolveUses.d.ts.map +1 -0
- package/lib/blocks/actions/resolveUses.js +13 -20
- package/lib/blocks/actions/resolveUses.js.map +1 -0
- package/lib/blocks/actions/steps.d.ts +25 -21
- package/lib/blocks/actions/steps.d.ts.map +1 -0
- package/lib/blocks/actions/steps.js +18 -23
- package/lib/blocks/actions/steps.js.map +1 -0
- package/lib/blocks/bin/getPrimaryBin.d.ts +4 -0
- package/lib/blocks/bin/getPrimaryBin.d.ts.map +1 -0
- package/lib/blocks/bin/getPrimaryBin.js +6 -4
- package/lib/blocks/bin/getPrimaryBin.js.map +1 -0
- package/lib/blocks/blockAllContributors.d.ts +70 -67
- package/lib/blocks/blockAllContributors.d.ts.map +1 -0
- package/lib/blocks/blockAllContributors.js +122 -170
- package/lib/blocks/blockAllContributors.js.map +1 -0
- package/lib/blocks/blockAreTheTypesWrong.d.ts +70 -67
- package/lib/blocks/blockAreTheTypesWrong.d.ts.map +1 -0
- package/lib/blocks/blockAreTheTypesWrong.js +13 -25
- package/lib/blocks/blockAreTheTypesWrong.js.map +1 -0
- package/lib/blocks/blockCSpell.d.ts +72 -69
- package/lib/blocks/blockCSpell.d.ts.map +1 -0
- package/lib/blocks/blockCSpell.js +68 -105
- package/lib/blocks/blockCSpell.js.map +1 -0
- package/lib/blocks/blockCTATransitions.d.ts +70 -67
- package/lib/blocks/blockCTATransitions.d.ts.map +1 -0
- package/lib/blocks/blockCTATransitions.js +108 -158
- package/lib/blocks/blockCTATransitions.js.map +1 -0
- package/lib/blocks/blockCodecov.d.ts +71 -68
- package/lib/blocks/blockCodecov.d.ts.map +1 -0
- package/lib/blocks/blockCodecov.js +48 -75
- package/lib/blocks/blockCodecov.js.map +1 -0
- package/lib/blocks/blockContributingDocs.d.ts +70 -67
- package/lib/blocks/blockContributingDocs.d.ts.map +1 -0
- package/lib/blocks/blockContributingDocs.js +14 -21
- package/lib/blocks/blockContributingDocs.js.map +1 -0
- package/lib/blocks/blockContributorCovenant.d.ts +70 -67
- package/lib/blocks/blockContributorCovenant.d.ts.map +1 -0
- package/lib/blocks/blockContributorCovenant.js +23 -37
- package/lib/blocks/blockContributorCovenant.js.map +1 -0
- package/lib/blocks/blockDevelopmentDocs.d.ts +83 -80
- package/lib/blocks/blockDevelopmentDocs.d.ts.map +1 -0
- package/lib/blocks/blockDevelopmentDocs.js +64 -74
- package/lib/blocks/blockDevelopmentDocs.js.map +1 -0
- package/lib/blocks/blockESLint.d.ts +95 -92
- package/lib/blocks/blockESLint.d.ts.map +1 -0
- package/lib/blocks/blockESLint.js +169 -263
- package/lib/blocks/blockESLint.js.map +1 -0
- package/lib/blocks/blockESLintComments.d.ts +70 -67
- package/lib/blocks/blockESLintComments.d.ts.map +1 -0
- package/lib/blocks/blockESLintComments.js +16 -21
- package/lib/blocks/blockESLintComments.js.map +1 -0
- package/lib/blocks/blockESLintJSDoc.d.ts +70 -67
- package/lib/blocks/blockESLintJSDoc.d.ts.map +1 -0
- package/lib/blocks/blockESLintJSDoc.js +20 -20
- package/lib/blocks/blockESLintJSDoc.js.map +1 -0
- package/lib/blocks/blockESLintJSONC.d.ts +70 -67
- package/lib/blocks/blockESLintJSONC.d.ts.map +1 -0
- package/lib/blocks/blockESLintJSONC.js +16 -16
- package/lib/blocks/blockESLintJSONC.js.map +1 -0
- package/lib/blocks/blockESLintMarkdown.d.ts +70 -67
- package/lib/blocks/blockESLintMarkdown.d.ts.map +1 -0
- package/lib/blocks/blockESLintMarkdown.js +17 -22
- package/lib/blocks/blockESLintMarkdown.js.map +1 -0
- package/lib/blocks/blockESLintMoreStyling.d.ts +70 -67
- package/lib/blocks/blockESLintMoreStyling.d.ts.map +1 -0
- package/lib/blocks/blockESLintMoreStyling.js +22 -30
- package/lib/blocks/blockESLintMoreStyling.js.map +1 -0
- package/lib/blocks/blockESLintNode.d.ts +70 -67
- package/lib/blocks/blockESLintNode.d.ts.map +1 -0
- package/lib/blocks/blockESLintNode.js +20 -23
- package/lib/blocks/blockESLintNode.js.map +1 -0
- package/lib/blocks/blockESLintPackageJson.d.ts +70 -67
- package/lib/blocks/blockESLintPackageJson.d.ts.map +1 -0
- package/lib/blocks/blockESLintPackageJson.js +26 -49
- package/lib/blocks/blockESLintPackageJson.js.map +1 -0
- package/lib/blocks/blockESLintPerfectionist.d.ts +70 -67
- package/lib/blocks/blockESLintPerfectionist.d.ts.map +1 -0
- package/lib/blocks/blockESLintPerfectionist.js +20 -27
- package/lib/blocks/blockESLintPerfectionist.js.map +1 -0
- package/lib/blocks/blockESLintPlugin.d.ts +71 -68
- package/lib/blocks/blockESLintPlugin.d.ts.map +1 -0
- package/lib/blocks/blockESLintPlugin.js +89 -137
- package/lib/blocks/blockESLintPlugin.js.map +1 -0
- package/lib/blocks/blockESLintRegexp.d.ts +70 -67
- package/lib/blocks/blockESLintRegexp.d.ts.map +1 -0
- package/lib/blocks/blockESLintRegexp.js +16 -18
- package/lib/blocks/blockESLintRegexp.js.map +1 -0
- package/lib/blocks/blockESLintYML.d.ts +70 -67
- package/lib/blocks/blockESLintYML.d.ts.map +1 -0
- package/lib/blocks/blockESLintYML.js +30 -41
- package/lib/blocks/blockESLintYML.js.map +1 -0
- package/lib/blocks/blockExampleFiles.d.ts +72 -69
- package/lib/blocks/blockExampleFiles.d.ts.map +1 -0
- package/lib/blocks/blockExampleFiles.js +22 -29
- package/lib/blocks/blockExampleFiles.js.map +1 -0
- package/lib/blocks/blockFunding.d.ts +70 -67
- package/lib/blocks/blockFunding.d.ts.map +1 -0
- package/lib/blocks/blockFunding.js +10 -15
- package/lib/blocks/blockFunding.js.map +1 -0
- package/lib/blocks/blockGitHubActionsCI.d.ts +85 -82
- package/lib/blocks/blockGitHubActionsCI.d.ts.map +1 -0
- package/lib/blocks/blockGitHubActionsCI.js +83 -134
- package/lib/blocks/blockGitHubActionsCI.js.map +1 -0
- package/lib/blocks/blockGitHubApps.d.ts +74 -71
- package/lib/blocks/blockGitHubApps.d.ts.map +1 -0
- package/lib/blocks/blockGitHubApps.js +15 -24
- package/lib/blocks/blockGitHubApps.js.map +1 -0
- package/lib/blocks/blockGitHubIssueTemplates.d.ts +70 -67
- package/lib/blocks/blockGitHubIssueTemplates.d.ts.map +1 -0
- package/lib/blocks/blockGitHubIssueTemplates.js +185 -204
- package/lib/blocks/blockGitHubIssueTemplates.js.map +1 -0
- package/lib/blocks/blockGitHubPRTemplate.d.ts +70 -67
- package/lib/blocks/blockGitHubPRTemplate.d.ts.map +1 -0
- package/lib/blocks/blockGitHubPRTemplate.js +11 -16
- package/lib/blocks/blockGitHubPRTemplate.js.map +1 -0
- package/lib/blocks/blockGitignore.d.ts +71 -68
- package/lib/blocks/blockGitignore.d.ts.map +1 -0
- package/lib/blocks/blockGitignore.js +13 -18
- package/lib/blocks/blockGitignore.js.map +1 -0
- package/lib/blocks/blockKnip.d.ts +73 -70
- package/lib/blocks/blockKnip.d.ts.map +1 -0
- package/lib/blocks/blockKnip.js +60 -88
- package/lib/blocks/blockKnip.js.map +1 -0
- package/lib/blocks/blockMITLicense.d.ts +70 -67
- package/lib/blocks/blockMITLicense.d.ts.map +1 -0
- package/lib/blocks/blockMITLicense.js +21 -31
- package/lib/blocks/blockMITLicense.js.map +1 -0
- package/lib/blocks/blockMain.d.ts +72 -69
- package/lib/blocks/blockMain.d.ts.map +1 -0
- package/lib/blocks/blockMain.js +17 -29
- package/lib/blocks/blockMain.js.map +1 -0
- package/lib/blocks/blockMarkdownlint.d.ts +71 -68
- package/lib/blocks/blockMarkdownlint.d.ts.map +1 -0
- package/lib/blocks/blockMarkdownlint.js +55 -94
- package/lib/blocks/blockMarkdownlint.js.map +1 -0
- package/lib/blocks/blockNcc.d.ts +71 -68
- package/lib/blocks/blockNcc.d.ts.map +1 -0
- package/lib/blocks/blockNcc.js +44 -72
- package/lib/blocks/blockNcc.js.map +1 -0
- package/lib/blocks/blockNvmrc.d.ts +70 -67
- package/lib/blocks/blockNvmrc.d.ts.map +1 -0
- package/lib/blocks/blockNvmrc.js +16 -21
- package/lib/blocks/blockNvmrc.js.map +1 -0
- package/lib/blocks/blockOctoGuide.d.ts +71 -68
- package/lib/blocks/blockOctoGuide.d.ts.map +1 -0
- package/lib/blocks/blockOctoGuide.js +65 -93
- package/lib/blocks/blockOctoGuide.js.map +1 -0
- package/lib/blocks/blockOctoGuideStrict.d.ts +70 -67
- package/lib/blocks/blockOctoGuideStrict.d.ts.map +1 -0
- package/lib/blocks/blockOctoGuideStrict.js +10 -15
- package/lib/blocks/blockOctoGuideStrict.js.map +1 -0
- package/lib/blocks/blockPackageJson.d.ts +144 -141
- package/lib/blocks/blockPackageJson.d.ts.map +1 -0
- package/lib/blocks/blockPackageJson.js +82 -113
- package/lib/blocks/blockPackageJson.js.map +1 -0
- package/lib/blocks/blockPnpmDedupe.d.ts +70 -67
- package/lib/blocks/blockPnpmDedupe.d.ts.map +1 -0
- package/lib/blocks/blockPnpmDedupe.js +24 -49
- package/lib/blocks/blockPnpmDedupe.js.map +1 -0
- package/lib/blocks/blockPrettier.d.ts +79 -76
- package/lib/blocks/blockPrettier.d.ts.map +1 -0
- package/lib/blocks/blockPrettier.js +82 -116
- package/lib/blocks/blockPrettier.js.map +1 -0
- package/lib/blocks/blockPrettierPluginCurly.d.ts +70 -67
- package/lib/blocks/blockPrettierPluginCurly.d.ts.map +1 -0
- package/lib/blocks/blockPrettierPluginCurly.js +10 -15
- package/lib/blocks/blockPrettierPluginCurly.js.map +1 -0
- package/lib/blocks/blockPrettierPluginPackageJson.d.ts +70 -67
- package/lib/blocks/blockPrettierPluginPackageJson.d.ts.map +1 -0
- package/lib/blocks/blockPrettierPluginPackageJson.js +10 -15
- package/lib/blocks/blockPrettierPluginPackageJson.js.map +1 -0
- package/lib/blocks/blockPrettierPluginSh.d.ts +70 -67
- package/lib/blocks/blockPrettierPluginSh.d.ts.map +1 -0
- package/lib/blocks/blockPrettierPluginSh.js +10 -15
- package/lib/blocks/blockPrettierPluginSh.js.map +1 -0
- package/lib/blocks/blockREADME.d.ts +82 -79
- package/lib/blocks/blockREADME.d.ts.map +1 -0
- package/lib/blocks/blockREADME.js +46 -60
- package/lib/blocks/blockREADME.js.map +1 -0
- package/lib/blocks/blockReleaseIt.d.ts +74 -71
- package/lib/blocks/blockReleaseIt.d.ts.map +1 -0
- package/lib/blocks/blockReleaseIt.js +152 -181
- package/lib/blocks/blockReleaseIt.js.map +1 -0
- package/lib/blocks/blockRemoveDependencies.d.ts +71 -68
- package/lib/blocks/blockRemoveDependencies.d.ts.map +1 -0
- package/lib/blocks/blockRemoveDependencies.js +18 -27
- package/lib/blocks/blockRemoveDependencies.js.map +1 -0
- package/lib/blocks/blockRemoveFiles.d.ts +71 -68
- package/lib/blocks/blockRemoveFiles.d.ts.map +1 -0
- package/lib/blocks/blockRemoveFiles.js +19 -28
- package/lib/blocks/blockRemoveFiles.js.map +1 -0
- package/lib/blocks/blockRemoveWorkflows.d.ts +71 -68
- package/lib/blocks/blockRemoveWorkflows.d.ts.map +1 -0
- package/lib/blocks/blockRemoveWorkflows.js +16 -27
- package/lib/blocks/blockRemoveWorkflows.js.map +1 -0
- package/lib/blocks/blockRenovate.d.ts +71 -68
- package/lib/blocks/blockRenovate.d.ts.map +1 -0
- package/lib/blocks/blockRenovate.js +37 -52
- package/lib/blocks/blockRenovate.js.map +1 -0
- package/lib/blocks/blockRepositoryBranchRuleset.d.ts +71 -68
- package/lib/blocks/blockRepositoryBranchRuleset.d.ts.map +1 -0
- package/lib/blocks/blockRepositoryBranchRuleset.js +77 -107
- package/lib/blocks/blockRepositoryBranchRuleset.js.map +1 -0
- package/lib/blocks/blockRepositoryLabels.d.ts +70 -67
- package/lib/blocks/blockRepositoryLabels.d.ts.map +1 -0
- package/lib/blocks/blockRepositoryLabels.js +51 -58
- package/lib/blocks/blockRepositoryLabels.js.map +1 -0
- package/lib/blocks/blockRepositorySecrets.d.ts +74 -71
- package/lib/blocks/blockRepositorySecrets.d.ts.map +1 -0
- package/lib/blocks/blockRepositorySecrets.js +15 -26
- package/lib/blocks/blockRepositorySecrets.js.map +1 -0
- package/lib/blocks/blockRepositorySettings.d.ts +70 -67
- package/lib/blocks/blockRepositorySettings.d.ts.map +1 -0
- package/lib/blocks/blockRepositorySettings.js +32 -39
- package/lib/blocks/blockRepositorySettings.js.map +1 -0
- package/lib/blocks/blockSecurityDocs.d.ts +70 -67
- package/lib/blocks/blockSecurityDocs.d.ts.map +1 -0
- package/lib/blocks/blockSecurityDocs.js +11 -16
- package/lib/blocks/blockSecurityDocs.js.map +1 -0
- package/lib/blocks/blockTSDown.d.ts +79 -0
- package/lib/blocks/blockTSDown.d.ts.map +1 -0
- package/lib/blocks/blockTSDown.js +111 -0
- package/lib/blocks/blockTSDown.js.map +1 -0
- package/lib/blocks/blockTemplatedWith.d.ts +70 -67
- package/lib/blocks/blockTemplatedWith.d.ts.map +1 -0
- package/lib/blocks/blockTemplatedWith.js +12 -20
- package/lib/blocks/blockTemplatedWith.js.map +1 -0
- package/lib/blocks/blockTypeScript.d.ts +181 -178
- package/lib/blocks/blockTypeScript.d.ts.map +1 -0
- package/lib/blocks/blockTypeScript.js +94 -127
- package/lib/blocks/blockTypeScript.js.map +1 -0
- package/lib/blocks/blockVSCode.d.ts +78 -75
- package/lib/blocks/blockVSCode.d.ts.map +1 -0
- package/lib/blocks/blockVSCode.js +51 -81
- package/lib/blocks/blockVSCode.js.map +1 -0
- package/lib/blocks/blockVitest.d.ts +86 -83
- package/lib/blocks/blockVitest.d.ts.map +1 -0
- package/lib/blocks/blockVitest.js +115 -168
- package/lib/blocks/blockVitest.js.map +1 -0
- package/lib/blocks/blockWebExt.d.ts +70 -67
- package/lib/blocks/blockWebExt.d.ts.map +1 -0
- package/lib/blocks/blockWebExt.js +59 -83
- package/lib/blocks/blockWebExt.js.map +1 -0
- package/lib/blocks/eslint/blockESLintIntake.d.ts +9 -6
- package/lib/blocks/eslint/blockESLintIntake.d.ts.map +1 -0
- package/lib/blocks/eslint/blockESLintIntake.js +84 -111
- package/lib/blocks/eslint/blockESLintIntake.js.map +1 -0
- package/lib/blocks/eslint/blockESLintPluginIntake.d.ts +5 -2
- package/lib/blocks/eslint/blockESLintPluginIntake.d.ts.map +1 -0
- package/lib/blocks/eslint/blockESLintPluginIntake.js +26 -44
- package/lib/blocks/eslint/blockESLintPluginIntake.js.map +1 -0
- package/lib/blocks/eslint/schemas.d.ts +77 -73
- package/lib/blocks/eslint/schemas.d.ts.map +1 -0
- package/lib/blocks/eslint/schemas.js +31 -36
- package/lib/blocks/eslint/schemas.js.map +1 -0
- package/lib/blocks/files/createJobName.d.ts +4 -0
- package/lib/blocks/files/createJobName.d.ts.map +1 -0
- package/lib/blocks/files/createJobName.js +6 -4
- package/lib/blocks/files/createJobName.js.map +1 -0
- package/lib/blocks/files/createMultiWorkflowFile.d.ts +21 -14
- package/lib/blocks/files/createMultiWorkflowFile.d.ts.map +1 -0
- package/lib/blocks/files/createMultiWorkflowFile.js +27 -35
- package/lib/blocks/files/createMultiWorkflowFile.js.map +1 -0
- package/lib/blocks/files/createSoloWorkflowFile.d.ts +61 -52
- package/lib/blocks/files/createSoloWorkflowFile.d.ts.map +1 -0
- package/lib/blocks/files/createSoloWorkflowFile.js +19 -25
- package/lib/blocks/files/createSoloWorkflowFile.js.map +1 -0
- package/lib/blocks/files/formatIgnoreFile.d.ts +4 -0
- package/lib/blocks/files/formatIgnoreFile.d.ts.map +1 -0
- package/lib/blocks/files/formatIgnoreFile.js +6 -4
- package/lib/blocks/files/formatIgnoreFile.js.map +1 -0
- package/lib/blocks/files/formatWorkflowYaml.d.ts +4 -0
- package/lib/blocks/files/formatWorkflowYaml.d.ts.map +1 -0
- package/lib/blocks/files/formatWorkflowYaml.js +7 -4
- package/lib/blocks/files/formatWorkflowYaml.js.map +1 -0
- package/lib/blocks/files/formatYaml.d.ts +4 -0
- package/lib/blocks/files/formatYaml.d.ts.map +1 -0
- package/lib/blocks/files/formatYaml.js +16 -21
- package/lib/blocks/files/formatYaml.js.map +1 -0
- package/lib/blocks/files/removeUsesQuotes.d.ts +4 -0
- package/lib/blocks/files/removeUsesQuotes.d.ts.map +1 -0
- package/lib/blocks/files/removeUsesQuotes.js +6 -7
- package/lib/blocks/files/removeUsesQuotes.js.map +1 -0
- package/lib/blocks/getInstallationSuggestions.d.ts +4 -0
- package/lib/blocks/getInstallationSuggestions.d.ts.map +1 -0
- package/lib/blocks/getInstallationSuggestions.js +11 -12
- package/lib/blocks/getInstallationSuggestions.js.map +1 -0
- package/lib/blocks/index.d.ts +3646 -3644
- package/lib/blocks/index.d.ts.map +1 -0
- package/lib/blocks/index.js +83 -177
- package/lib/blocks/index.js.map +1 -0
- package/lib/blocks/intake/intakeFile.d.ts +5 -1
- package/lib/blocks/intake/intakeFile.d.ts.map +1 -0
- package/lib/blocks/intake/intakeFile.js +12 -18
- package/lib/blocks/intake/intakeFile.js.map +1 -0
- package/lib/blocks/intake/intakeFileAsJson.d.ts +5 -1
- package/lib/blocks/intake/intakeFileAsJson.d.ts.map +1 -0
- package/lib/blocks/intake/intakeFileAsJson.js +13 -10
- package/lib/blocks/intake/intakeFileAsJson.js.map +1 -0
- package/lib/blocks/intake/intakeFileAsYaml.d.ts +5 -1
- package/lib/blocks/intake/intakeFileAsYaml.d.ts.map +1 -0
- package/lib/blocks/intake/intakeFileAsYaml.js +13 -10
- package/lib/blocks/intake/intakeFileAsYaml.js.map +1 -0
- package/lib/blocks/intake/intakeFileDefineConfig.d.ts +5 -1
- package/lib/blocks/intake/intakeFileDefineConfig.d.ts.map +1 -0
- package/lib/blocks/intake/intakeFileDefineConfig.js +20 -23
- package/lib/blocks/intake/intakeFileDefineConfig.js.map +1 -0
- package/lib/blocks/options.fakes.d.ts +23 -20
- package/lib/blocks/options.fakes.d.ts.map +1 -0
- package/lib/blocks/options.fakes.js +19 -23
- package/lib/blocks/options.fakes.js.map +1 -0
- package/lib/blocks/outcomeLabels.d.ts +12 -9
- package/lib/blocks/outcomeLabels.d.ts.map +1 -0
- package/lib/blocks/outcomeLabels.js +93 -92
- package/lib/blocks/outcomeLabels.js.map +1 -0
- package/lib/blocks/phases.d.ts +9 -6
- package/lib/blocks/phases.d.ts.map +1 -0
- package/lib/blocks/phases.js +10 -8
- package/lib/blocks/phases.js.map +1 -0
- package/lib/constants.d.ts +8 -5
- package/lib/constants.d.ts.map +1 -0
- package/lib/constants.js +9 -9
- package/lib/constants.js.map +1 -0
- package/lib/data/contributions.d.ts +4 -0
- package/lib/data/contributions.d.ts.map +1 -0
- package/lib/data/contributions.js +13 -11
- package/lib/data/contributions.js.map +1 -0
- package/lib/data/packageData.d.ts +7 -166
- package/lib/data/packageData.d.ts.map +1 -0
- package/lib/data/packageData.js +16 -24
- package/lib/data/packageData.js.map +1 -0
- package/lib/index.d.ts +290 -288
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +61 -7
- package/lib/index.js.map +1 -0
- package/lib/inputs/inputFromDirectory.d.ts +8 -4
- package/lib/inputs/inputFromDirectory.d.ts.map +1 -0
- package/lib/inputs/inputFromDirectory.js +11 -10
- package/lib/inputs/inputFromDirectory.js.map +1 -0
- package/lib/inputs/inputFromOctokit.d.ts +9 -5
- package/lib/inputs/inputFromOctokit.d.ts.map +1 -0
- package/lib/inputs/inputFromOctokit.js +23 -24
- package/lib/inputs/inputFromOctokit.js.map +1 -0
- package/lib/options/readAccess.d.ts +5 -1
- package/lib/options/readAccess.d.ts.map +1 -0
- package/lib/options/readAccess.js +6 -4
- package/lib/options/readAccess.js.map +1 -0
- package/lib/options/readAllContributors.d.ts +6 -2
- package/lib/options/readAllContributors.d.ts.map +1 -0
- package/lib/options/readAllContributors.js +17 -22
- package/lib/options/readAllContributors.js.map +1 -0
- package/lib/options/readAuthor.d.ts +6 -3
- package/lib/options/readAuthor.d.ts.map +1 -0
- package/lib/options/readAuthor.js +6 -4
- package/lib/options/readAuthor.js.map +1 -0
- package/lib/options/readBin.d.ts +5 -1
- package/lib/options/readBin.d.ts.map +1 -0
- package/lib/options/readBin.js +8 -10
- package/lib/options/readBin.js.map +1 -0
- package/lib/options/readDescription.d.ts +5 -1
- package/lib/options/readDescription.d.ts.map +1 -0
- package/lib/options/readDescription.js +16 -23
- package/lib/options/readDescription.js.map +1 -0
- package/lib/options/readDescriptionFromReadme.d.ts +4 -0
- package/lib/options/readDescriptionFromReadme.d.ts.map +1 -0
- package/lib/options/readDescriptionFromReadme.js +11 -13
- package/lib/options/readDescriptionFromReadme.js.map +1 -0
- package/lib/options/readDevelopmentDocumentation.d.ts +5 -1
- package/lib/options/readDevelopmentDocumentation.d.ts.map +1 -0
- package/lib/options/readDevelopmentDocumentation.js +18 -21
- package/lib/options/readDevelopmentDocumentation.js.map +1 -0
- package/lib/options/readDocumentation.d.ts +5 -2
- package/lib/options/readDocumentation.d.ts.map +1 -0
- package/lib/options/readDocumentation.js +21 -19
- package/lib/options/readDocumentation.js.map +1 -0
- package/lib/options/readEmailFromCodeOfConduct.d.ts +5 -1
- package/lib/options/readEmailFromCodeOfConduct.d.ts.map +1 -0
- package/lib/options/readEmailFromCodeOfConduct.js +8 -7
- package/lib/options/readEmailFromCodeOfConduct.js.map +1 -0
- package/lib/options/readEmailFromGit.d.ts +5 -1
- package/lib/options/readEmailFromGit.d.ts.map +1 -0
- package/lib/options/readEmailFromGit.js +7 -4
- package/lib/options/readEmailFromGit.js.map +1 -0
- package/lib/options/readEmailFromNpm.d.ts +6 -3
- package/lib/options/readEmailFromNpm.d.ts.map +1 -0
- package/lib/options/readEmailFromNpm.js +6 -4
- package/lib/options/readEmailFromNpm.js.map +1 -0
- package/lib/options/readEmails.d.ts +7 -4
- package/lib/options/readEmails.d.ts.map +1 -0
- package/lib/options/readEmails.js +11 -6
- package/lib/options/readEmails.js.map +1 -0
- package/lib/options/readEmoji.d.ts +4 -0
- package/lib/options/readEmoji.d.ts.map +1 -0
- package/lib/options/readEmoji.js +6 -4
- package/lib/options/readEmoji.js.map +1 -0
- package/lib/options/readExistingLabels.d.ts +8 -4
- package/lib/options/readExistingLabels.d.ts.map +1 -0
- package/lib/options/readExistingLabels.js +21 -20
- package/lib/options/readExistingLabels.js.map +1 -0
- package/lib/options/readFileAsJson.d.ts +4 -0
- package/lib/options/readFileAsJson.d.ts.map +1 -0
- package/lib/options/readFileAsJson.js +11 -11
- package/lib/options/readFileAsJson.js.map +1 -0
- package/lib/options/readFileSafe.d.ts +4 -0
- package/lib/options/readFileSafe.d.ts.map +1 -0
- package/lib/options/readFileSafe.js +11 -8
- package/lib/options/readFileSafe.js.map +1 -0
- package/lib/options/readFunding.d.ts +5 -1
- package/lib/options/readFunding.d.ts.map +1 -0
- package/lib/options/readFunding.js +8 -7
- package/lib/options/readFunding.js.map +1 -0
- package/lib/options/readGitDefaults.d.ts +6 -2
- package/lib/options/readGitDefaults.d.ts.map +1 -0
- package/lib/options/readGitDefaults.js +9 -8
- package/lib/options/readGitDefaults.js.map +1 -0
- package/lib/options/readGuide.d.ts +7 -3
- package/lib/options/readGuide.d.ts.map +1 -0
- package/lib/options/readGuide.js +14 -19
- package/lib/options/readGuide.js.map +1 -0
- package/lib/options/readKeywords.d.ts +5 -1
- package/lib/options/readKeywords.d.ts.map +1 -0
- package/lib/options/readKeywords.js +7 -5
- package/lib/options/readKeywords.js.map +1 -0
- package/lib/options/readLogo.d.ts +8 -4
- package/lib/options/readLogo.d.ts.map +1 -0
- package/lib/options/readLogo.js +19 -22
- package/lib/options/readLogo.js.map +1 -0
- package/lib/options/readLogoSizing.d.ts +7 -3
- package/lib/options/readLogoSizing.d.ts.map +1 -0
- package/lib/options/readLogoSizing.js +26 -22
- package/lib/options/readLogoSizing.js.map +1 -0
- package/lib/options/readNode.d.ts +7 -3
- package/lib/options/readNode.d.ts.map +1 -0
- package/lib/options/readNode.js +12 -9
- package/lib/options/readNode.js.map +1 -0
- package/lib/options/readNpmDefaults.d.ts +7 -3
- package/lib/options/readNpmDefaults.d.ts.map +1 -0
- package/lib/options/readNpmDefaults.js +9 -6
- package/lib/options/readNpmDefaults.js.map +1 -0
- package/lib/options/readOwner.d.ts +7 -4
- package/lib/options/readOwner.d.ts.map +1 -0
- package/lib/options/readOwner.js +7 -6
- package/lib/options/readOwner.js.map +1 -0
- package/lib/options/readPackageAuthor.d.ts +8 -4
- package/lib/options/readPackageAuthor.d.ts.map +1 -0
- package/lib/options/readPackageAuthor.js +12 -12
- package/lib/options/readPackageAuthor.js.map +1 -0
- package/lib/options/readPackageData.d.ts +6 -2
- package/lib/options/readPackageData.d.ts.map +1 -0
- package/lib/options/readPackageData.js +8 -9
- package/lib/options/readPackageData.js.map +1 -0
- package/lib/options/readPnpm.d.ts +5 -1
- package/lib/options/readPnpm.d.ts.map +1 -0
- package/lib/options/readPnpm.js +7 -5
- package/lib/options/readPnpm.js.map +1 -0
- package/lib/options/readReadmeAdditional.d.ts +4 -0
- package/lib/options/readReadmeAdditional.d.ts.map +1 -0
- package/lib/options/readReadmeAdditional.js +15 -22
- package/lib/options/readReadmeAdditional.js.map +1 -0
- package/lib/options/readReadmeExplainer.d.ts +4 -0
- package/lib/options/readReadmeExplainer.d.ts.map +1 -0
- package/lib/options/readReadmeExplainer.js +24 -25
- package/lib/options/readReadmeExplainer.js.map +1 -0
- package/lib/options/readReadmeFootnotes.d.ts +4 -0
- package/lib/options/readReadmeFootnotes.d.ts.map +1 -0
- package/lib/options/readReadmeFootnotes.js +15 -24
- package/lib/options/readReadmeFootnotes.js.map +1 -0
- package/lib/options/readReadmeUsage.d.ts +4 -0
- package/lib/options/readReadmeUsage.d.ts.map +1 -0
- package/lib/options/readReadmeUsage.js +13 -15
- package/lib/options/readReadmeUsage.js.map +1 -0
- package/lib/options/readRepository.d.ts +8 -4
- package/lib/options/readRepository.d.ts.map +1 -0
- package/lib/options/readRepository.js +6 -4
- package/lib/options/readRepository.js.map +1 -0
- package/lib/options/readRulesetId.d.ts +5 -1
- package/lib/options/readRulesetId.d.ts.map +1 -0
- package/lib/options/readRulesetId.js +14 -13
- package/lib/options/readRulesetId.js.map +1 -0
- package/lib/options/readTitle.d.ts +4 -0
- package/lib/options/readTitle.d.ts.map +1 -0
- package/lib/options/readTitle.js +11 -10
- package/lib/options/readTitle.js.map +1 -0
- package/lib/options/readWords.d.ts +5 -1
- package/lib/options/readWords.d.ts.map +1 -0
- package/lib/options/readWords.js +9 -10
- package/lib/options/readWords.js.map +1 -0
- package/lib/options/readWorkflowsVersions.d.ts +6 -3
- package/lib/options/readWorkflowsVersions.d.ts.map +1 -0
- package/lib/options/readWorkflowsVersions.js +45 -63
- package/lib/options/readWorkflowsVersions.js.map +1 -0
- package/lib/presets/common.d.ts +169 -166
- package/lib/presets/common.d.ts.map +1 -0
- package/lib/presets/common.js +21 -18
- package/lib/presets/common.js.map +1 -0
- package/lib/presets/everything.d.ts +169 -166
- package/lib/presets/everything.d.ts.map +1 -0
- package/lib/presets/everything.js +39 -36
- package/lib/presets/everything.js.map +1 -0
- package/lib/presets/index.d.ts +504 -502
- package/lib/presets/index.d.ts.map +1 -0
- package/lib/presets/index.js +10 -13
- package/lib/presets/index.js.map +1 -0
- package/lib/presets/minimal.d.ts +169 -166
- package/lib/presets/minimal.d.ts.map +1 -0
- package/lib/presets/minimal.js +51 -48
- package/lib/presets/minimal.js.map +1 -0
- package/lib/schemas.d.ts +75 -71
- package/lib/schemas.d.ts.map +1 -0
- package/lib/schemas.js +19 -21
- package/lib/schemas.js.map +1 -0
- package/lib/template.d.ts +169 -166
- package/lib/template.d.ts.map +1 -0
- package/lib/template.js +31 -24
- package/lib/template.js.map +1 -0
- package/lib/types.d.ts +32 -30
- package/lib/types.d.ts.map +1 -0
- package/lib/utils/htmlToTextSafe.d.ts +4 -0
- package/lib/utils/htmlToTextSafe.d.ts.map +1 -0
- package/lib/utils/htmlToTextSafe.js +13 -12
- package/lib/utils/htmlToTextSafe.js.map +1 -0
- package/lib/utils/resolveBin.d.ts +4 -0
- package/lib/utils/resolveBin.d.ts.map +1 -0
- package/lib/utils/resolveBin.js +7 -4
- package/lib/utils/resolveBin.js.map +1 -0
- package/lib/utils/swallowError.d.ts +4 -0
- package/lib/utils/swallowError.d.ts.map +1 -0
- package/lib/utils/swallowError.js +6 -4
- package/lib/utils/swallowError.js.map +1 -0
- package/lib/utils/swallowErrorAsync.d.ts +4 -0
- package/lib/utils/swallowErrorAsync.d.ts.map +1 -0
- package/lib/utils/swallowErrorAsync.js +10 -8
- package/lib/utils/swallowErrorAsync.js.map +1 -0
- package/lib/utils/trimPrecedingSlash.d.ts +4 -0
- package/lib/utils/trimPrecedingSlash.d.ts.map +1 -0
- package/lib/utils/trimPrecedingSlash.js +6 -4
- package/lib/utils/trimPrecedingSlash.js.map +1 -0
- package/lib/utils/tryCatch.d.ts +4 -0
- package/lib/utils/tryCatch.d.ts.map +1 -0
- package/lib/utils/tryCatch.js +10 -8
- package/lib/utils/tryCatch.js.map +1 -0
- package/package.json +3 -3
- package/lib/blocks/blockTSup.d.ts +0 -76
- package/lib/blocks/blockTSup.js +0 -139
|
@@ -1,294 +1,200 @@
|
|
|
1
|
-
import { parse as parsePackageName } from "parse-package-name";
|
|
2
|
-
import sortKeys from "sort-keys";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
import { base } from "../base.js";
|
|
5
1
|
import { getPackageDependencies } from "../data/packageData.js";
|
|
6
|
-
import {
|
|
2
|
+
import { base } from "../base.js";
|
|
3
|
+
import { intakeFile } from "./intake/intakeFile.js";
|
|
4
|
+
import { CommandPhase } from "./phases.js";
|
|
5
|
+
import { blockRemoveFiles } from "./blockRemoveFiles.js";
|
|
7
6
|
import { blockGitHubActionsCI } from "./blockGitHubActionsCI.js";
|
|
8
7
|
import { blockPackageJson } from "./blockPackageJson.js";
|
|
9
|
-
import {
|
|
10
|
-
import { blockRemoveFiles } from "./blockRemoveFiles.js";
|
|
8
|
+
import { blockDevelopmentDocs } from "./blockDevelopmentDocs.js";
|
|
11
9
|
import { blockRemoveWorkflows } from "./blockRemoveWorkflows.js";
|
|
12
10
|
import { blockVSCode } from "./blockVSCode.js";
|
|
11
|
+
import { blockRemoveDependencies } from "./blockRemoveDependencies.js";
|
|
12
|
+
import { zExtension, zExtensionRules, zPackageImport } from "./eslint/schemas.js";
|
|
13
13
|
import { blockESLintIntake } from "./eslint/blockESLintIntake.js";
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
import { intakeFile } from "./intake/intakeFile.js";
|
|
20
|
-
import { CommandPhase } from "./phases.js";
|
|
14
|
+
import { z } from "zod";
|
|
15
|
+
import sortKeys from "sort-keys";
|
|
16
|
+
import { parse } from "parse-package-name";
|
|
17
|
+
|
|
18
|
+
//#region src/blocks/blockESLint.ts
|
|
21
19
|
const blockESLint = base.createBlock({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
parserOptions: {
|
|
73
|
-
projectService: {
|
|
74
|
-
allowDefaultProject: Array.from(
|
|
75
|
-
new Set(
|
|
76
|
-
[
|
|
77
|
-
"*.config.*s",
|
|
78
|
-
...typeof options.bin === "object" ? Object.values(options.bin) : [options.bin]
|
|
79
|
-
].filter(Boolean).sort()
|
|
80
|
-
)
|
|
81
|
-
)
|
|
82
|
-
},
|
|
83
|
-
tsconfigRootDir: "import.meta.dirname"
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
...rules && { rules },
|
|
87
|
-
...settings && { settings }
|
|
88
|
-
}),
|
|
89
|
-
...options.type === "commonjs" ? [
|
|
90
|
-
printExtension({
|
|
91
|
-
files: ["*.mjs"],
|
|
92
|
-
languageOptions: { sourceType: "module" }
|
|
93
|
-
})
|
|
94
|
-
] : [],
|
|
95
|
-
...extensions.map(
|
|
96
|
-
(extension) => typeof extension === "string" ? extension : printExtension(extension)
|
|
97
|
-
)
|
|
98
|
-
].sort((a, b) => processForSort(a).localeCompare(processForSort(b))).map((t) => t);
|
|
99
|
-
return {
|
|
100
|
-
addons: [
|
|
101
|
-
blockDevelopmentDocs({
|
|
102
|
-
sections: {
|
|
103
|
-
Linting: {
|
|
104
|
-
contents: {
|
|
105
|
-
after: [
|
|
106
|
-
`
|
|
20
|
+
about: { name: "ESLint" },
|
|
21
|
+
addons: {
|
|
22
|
+
beforeLint: z.string().optional(),
|
|
23
|
+
explanations: z.array(z.string()).default([]),
|
|
24
|
+
extensions: z.array(z.union([z.string(), zExtension])).default([]),
|
|
25
|
+
ignores: z.array(z.string()).default([]),
|
|
26
|
+
imports: z.array(zPackageImport).default([]),
|
|
27
|
+
rules: zExtensionRules.optional(),
|
|
28
|
+
settings: z.record(z.string(), z.unknown()).optional()
|
|
29
|
+
},
|
|
30
|
+
intake({ files }) {
|
|
31
|
+
const eslintConfigRaw = intakeFile(files, [["eslint.config.js", "eslint.config.mjs"]]);
|
|
32
|
+
return eslintConfigRaw ? blockESLintIntake(eslintConfigRaw[0]) : void 0;
|
|
33
|
+
},
|
|
34
|
+
produce({ addons, options }) {
|
|
35
|
+
const { explanations, extensions, ignores, imports, rules, settings } = addons;
|
|
36
|
+
const [configFileName, fileExtensions] = options.type === "commonjs" ? ["eslint.config.mjs", "js,mjs,ts"] : ["eslint.config.js", "js,ts"];
|
|
37
|
+
const explanation = explanations.length > 0 ? `${explanations.map((explanation$1) => `/*\n${explanation$1}\n*/\n`).join("")}\n` : "";
|
|
38
|
+
const importLines = [
|
|
39
|
+
"import eslint from \"@eslint/js\";",
|
|
40
|
+
"import tseslint from \"typescript-eslint\";",
|
|
41
|
+
...imports.map((packageImport) => `import ${packageImport.specifier} from "${typeof packageImport.source === "string" ? packageImport.source : packageImport.source.packageName}"`)
|
|
42
|
+
].sort((a, b) => a.replace(/.+from/, "").localeCompare(b.replace(/.+from/, "")));
|
|
43
|
+
const ignoreLines = Array.from(new Set([
|
|
44
|
+
"lib",
|
|
45
|
+
"node_modules",
|
|
46
|
+
"pnpm-lock.yaml",
|
|
47
|
+
...ignores
|
|
48
|
+
].map((ignore) => JSON.stringify(ignore)))).sort();
|
|
49
|
+
const extensionLines = [
|
|
50
|
+
printExtension({
|
|
51
|
+
extends: ["tseslint.configs.strictTypeChecked", "tseslint.configs.stylisticTypeChecked"],
|
|
52
|
+
files: [`**/*.{${fileExtensions}}`],
|
|
53
|
+
languageOptions: { parserOptions: {
|
|
54
|
+
projectService: { allowDefaultProject: Array.from(new Set(["*.config.*s", ...typeof options.bin === "object" ? Object.values(options.bin) : [options.bin]].filter(Boolean).sort())) },
|
|
55
|
+
tsconfigRootDir: "import.meta.dirname"
|
|
56
|
+
} },
|
|
57
|
+
...rules && { rules },
|
|
58
|
+
...settings && { settings }
|
|
59
|
+
}),
|
|
60
|
+
...options.type === "commonjs" ? [printExtension({
|
|
61
|
+
files: ["*.mjs"],
|
|
62
|
+
languageOptions: { sourceType: "module" }
|
|
63
|
+
})] : [],
|
|
64
|
+
...extensions.map((extension) => typeof extension === "string" ? extension : printExtension(extension))
|
|
65
|
+
].sort((a, b) => processForSort(a).localeCompare(processForSort(b))).map((t) => t);
|
|
66
|
+
return {
|
|
67
|
+
addons: [
|
|
68
|
+
blockDevelopmentDocs({ sections: { Linting: { contents: {
|
|
69
|
+
after: [`
|
|
107
70
|
For example, ESLint can be run with \`--fix\` to auto-fix some lint rule complaints:
|
|
108
71
|
|
|
109
72
|
\`\`\`shell
|
|
110
73
|
pnpm run lint --fix
|
|
111
74
|
\`\`\`
|
|
112
|
-
`,
|
|
113
|
-
|
|
114
|
-
],
|
|
115
|
-
before: `
|
|
75
|
+
`, ...addons.beforeLint ? [addons.beforeLint] : []],
|
|
76
|
+
before: `
|
|
116
77
|
This package includes several forms of linting to enforce consistent code quality and styling.
|
|
117
78
|
Each should be shown in VS Code, and can be run manually on the command-line:
|
|
118
79
|
`,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
)
|
|
159
|
-
},
|
|
160
|
-
scripts: {
|
|
161
|
-
lint: "eslint . --max-warnings 0"
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}),
|
|
165
|
-
blockVSCode({
|
|
166
|
-
extensions: ["dbaeumer.vscode-eslint"],
|
|
167
|
-
settings: {
|
|
168
|
-
"editor.codeActionsOnSave": {
|
|
169
|
-
"source.fixAll.eslint": "explicit"
|
|
170
|
-
},
|
|
171
|
-
"eslint.probe": [
|
|
172
|
-
"javascript",
|
|
173
|
-
"javascriptreact",
|
|
174
|
-
"json",
|
|
175
|
-
"jsonc",
|
|
176
|
-
"markdown",
|
|
177
|
-
"typescript",
|
|
178
|
-
"typescriptreact",
|
|
179
|
-
"yaml"
|
|
180
|
-
],
|
|
181
|
-
"eslint.rules.customizations": [{ rule: "*", severity: "warn" }]
|
|
182
|
-
}
|
|
183
|
-
})
|
|
184
|
-
],
|
|
185
|
-
files: {
|
|
186
|
-
[configFileName]: `${explanation}${importLines.join("\n")}
|
|
80
|
+
items: [`- \`pnpm lint\` ([ESLint](https://eslint.org) with [typescript-eslint](https://typescript-eslint.io)): Lints JavaScript and TypeScript source files`],
|
|
81
|
+
plural: `Read the individual documentation for each linter to understand how it can be configured and used best.`
|
|
82
|
+
} } } }),
|
|
83
|
+
blockGitHubActionsCI({ jobs: [{
|
|
84
|
+
name: "Lint",
|
|
85
|
+
steps: [...options.bin ? [{ run: "pnpm build" }] : [], { run: "pnpm lint" }]
|
|
86
|
+
}] }),
|
|
87
|
+
blockPackageJson({ properties: {
|
|
88
|
+
devDependencies: {
|
|
89
|
+
...getPackageDependencies("@eslint/js", "@types/node", "eslint", "typescript-eslint", ...imports.filter((imported) => typeof imported.source === "string").flatMap(({ source, types }) => {
|
|
90
|
+
const { name } = parse(source);
|
|
91
|
+
return types ? [name, `@types/${name}`] : [name];
|
|
92
|
+
})),
|
|
93
|
+
...Object.fromEntries(imports.filter((imported) => typeof imported.source === "object").map((imported) => [imported.source.packageName, imported.source.version]))
|
|
94
|
+
},
|
|
95
|
+
scripts: { lint: "eslint . --max-warnings 0" }
|
|
96
|
+
} }),
|
|
97
|
+
blockVSCode({
|
|
98
|
+
extensions: ["dbaeumer.vscode-eslint"],
|
|
99
|
+
settings: {
|
|
100
|
+
"editor.codeActionsOnSave": { "source.fixAll.eslint": "explicit" },
|
|
101
|
+
"eslint.probe": [
|
|
102
|
+
"javascript",
|
|
103
|
+
"javascriptreact",
|
|
104
|
+
"json",
|
|
105
|
+
"jsonc",
|
|
106
|
+
"markdown",
|
|
107
|
+
"typescript",
|
|
108
|
+
"typescriptreact",
|
|
109
|
+
"yaml"
|
|
110
|
+
],
|
|
111
|
+
"eslint.rules.customizations": [{
|
|
112
|
+
rule: "*",
|
|
113
|
+
severity: "warn"
|
|
114
|
+
}]
|
|
115
|
+
}
|
|
116
|
+
})
|
|
117
|
+
],
|
|
118
|
+
files: { [configFileName]: `${explanation}${importLines.join("\n")}
|
|
187
119
|
|
|
188
120
|
export default tseslint.config(
|
|
189
121
|
{ ignores: [${ignoreLines.join(", ")}] },
|
|
190
|
-
${printExtension({
|
|
191
|
-
linterOptions: { reportUnusedDisableDirectives: "error" }
|
|
192
|
-
})},
|
|
122
|
+
${printExtension({ linterOptions: { reportUnusedDisableDirectives: "error" } })},
|
|
193
123
|
eslint.configs.recommended,
|
|
194
124
|
${extensionLines.join(",")}
|
|
195
|
-
);`
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
".eslintrc*",
|
|
222
|
-
".eslintignore",
|
|
223
|
-
options.type === "commonjs" ? "eslint.config.{cjs,js}" : "eslint.config.{cjs,mjs}"
|
|
224
|
-
]
|
|
225
|
-
}),
|
|
226
|
-
blockRemoveWorkflows({
|
|
227
|
-
workflows: ["eslint", "lint"]
|
|
228
|
-
})
|
|
229
|
-
]
|
|
230
|
-
};
|
|
231
|
-
}
|
|
125
|
+
);` },
|
|
126
|
+
scripts: [{
|
|
127
|
+
commands: ["pnpm lint --fix"],
|
|
128
|
+
phase: CommandPhase.Process
|
|
129
|
+
}]
|
|
130
|
+
};
|
|
131
|
+
},
|
|
132
|
+
transition({ options }) {
|
|
133
|
+
return { addons: [
|
|
134
|
+
blockRemoveDependencies({ dependencies: [
|
|
135
|
+
"@types/eslint",
|
|
136
|
+
"@typescript-eslint/eslint-plugin",
|
|
137
|
+
"@typescript-eslint/parser",
|
|
138
|
+
"eslint-plugin-deprecation",
|
|
139
|
+
"eslint-plugin-eslint-comments",
|
|
140
|
+
"eslint-plugin-no-only-tests",
|
|
141
|
+
"yaml-eslint-parser"
|
|
142
|
+
] }),
|
|
143
|
+
blockRemoveFiles({ files: [
|
|
144
|
+
".eslintrc*",
|
|
145
|
+
".eslintignore",
|
|
146
|
+
options.type === "commonjs" ? "eslint.config.{cjs,js}" : "eslint.config.{cjs,mjs}"
|
|
147
|
+
] }),
|
|
148
|
+
blockRemoveWorkflows({ workflows: ["eslint", "lint"] })
|
|
149
|
+
] };
|
|
150
|
+
}
|
|
232
151
|
});
|
|
233
152
|
function groupByComment(rulesGroups) {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
153
|
+
const byComment = /* @__PURE__ */ new Map();
|
|
154
|
+
const grouped = [];
|
|
155
|
+
for (const group of rulesGroups) {
|
|
156
|
+
const existing = byComment.get(group.comment);
|
|
157
|
+
if (existing) {
|
|
158
|
+
existing.entries = {
|
|
159
|
+
...existing.entries,
|
|
160
|
+
...group.entries
|
|
161
|
+
};
|
|
162
|
+
continue;
|
|
163
|
+
} else {
|
|
164
|
+
byComment.set(group.comment, group);
|
|
165
|
+
grouped.push(group);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return grouped;
|
|
250
169
|
}
|
|
251
170
|
function printExtension(extension) {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
171
|
+
return [
|
|
172
|
+
"{",
|
|
173
|
+
extension.extends && `extends: [${extension.extends.join(", ")}],`,
|
|
174
|
+
extension.files && `files: [${extension.files.map((glob) => JSON.stringify(glob)).join(", ")}],`,
|
|
175
|
+
extension.languageOptions && `languageOptions: ${JSON.stringify(extension.languageOptions).replace("\"import.meta.dirname\"", "import.meta.dirname")},`,
|
|
176
|
+
extension.linterOptions && `linterOptions: ${JSON.stringify(extension.linterOptions)}`,
|
|
177
|
+
extension.rules && `rules: ${printExtensionRules(extension.rules)},`,
|
|
178
|
+
extension.settings && `settings: ${JSON.stringify(sortKeys(extension.settings))},`,
|
|
179
|
+
"}"
|
|
180
|
+
].filter(Boolean).join(" ");
|
|
262
181
|
}
|
|
263
182
|
function printExtensionRules(rules) {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
printGroupComment(group.comment),
|
|
271
|
-
...Object.entries(group.entries).map(
|
|
272
|
-
([ruleName, options]) => `"${ruleName}": ${JSON.stringify(options)},`
|
|
273
|
-
)
|
|
274
|
-
]),
|
|
275
|
-
"}"
|
|
276
|
-
].join("");
|
|
183
|
+
if (!Array.isArray(rules)) return JSON.stringify(rules);
|
|
184
|
+
return [
|
|
185
|
+
"{",
|
|
186
|
+
...groupByComment(rules).flatMap((group) => [printGroupComment(group.comment), ...Object.entries(group.entries).map(([ruleName, options]) => `"${ruleName}": ${JSON.stringify(options)},`)]),
|
|
187
|
+
"}"
|
|
188
|
+
].join("");
|
|
277
189
|
}
|
|
278
190
|
function printGroupComment(comment) {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
// ${comment.replaceAll("\n", "\n// ")}
|
|
282
|
-
` : "";
|
|
191
|
+
return comment ? `\n\n// ${comment.replaceAll("\n", "\n// ")}\n` : "";
|
|
283
192
|
}
|
|
284
193
|
function processForSort(line) {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
${line.replaceAll(/\W+/g, "")}`;
|
|
288
|
-
}
|
|
289
|
-
return `B
|
|
290
|
-
${(/files: (.+)/.exec(line)?.[1] ?? line).replaceAll(/\W+/g, "")}`;
|
|
194
|
+
if (line.startsWith("...") || /\w+/.test(line[0])) return `A\n${line.replaceAll(/\W+/g, "")}`;
|
|
195
|
+
return `B\n${(/files: (.+)/.exec(line)?.[1] ?? line).replaceAll(/\W+/g, "")}`;
|
|
291
196
|
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
};
|
|
197
|
+
|
|
198
|
+
//#endregion
|
|
199
|
+
export { blockESLint };
|
|
200
|
+
//# sourceMappingURL=blockESLint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blockESLint.js","names":["explanation","rulesGroups: ExtensionRuleGroup[]","grouped: typeof rulesGroups","extension: Extension","rules: ExtensionRules","comment: string | undefined","line: string"],"sources":["../../src/blocks/blockESLint.ts"],"sourcesContent":["// @ts-expect-error -- https://github.com/egoist/parse-package-name/issues/30\nimport { parse as parsePackageName } from \"parse-package-name\";\nimport sortKeys from \"sort-keys\";\nimport { z } from \"zod\";\n\nimport { base } from \"../base.js\";\nimport { getPackageDependencies } from \"../data/packageData.js\";\nimport { blockDevelopmentDocs } from \"./blockDevelopmentDocs.js\";\nimport { blockGitHubActionsCI } from \"./blockGitHubActionsCI.js\";\nimport { blockPackageJson } from \"./blockPackageJson.js\";\nimport { blockRemoveDependencies } from \"./blockRemoveDependencies.js\";\nimport { blockRemoveFiles } from \"./blockRemoveFiles.js\";\nimport { blockRemoveWorkflows } from \"./blockRemoveWorkflows.js\";\nimport { blockVSCode } from \"./blockVSCode.js\";\nimport { blockESLintIntake } from \"./eslint/blockESLintIntake.js\";\nimport {\n\tExtension,\n\tExtensionRuleGroup,\n\tExtensionRules,\n\tzExtension,\n\tzExtensionRules,\n\tzPackageImport,\n} from \"./eslint/schemas.js\";\nimport { intakeFile } from \"./intake/intakeFile.js\";\nimport { CommandPhase } from \"./phases.js\";\n\nexport const blockESLint = base.createBlock({\n\tabout: {\n\t\tname: \"ESLint\",\n\t},\n\taddons: {\n\t\tbeforeLint: z.string().optional(),\n\t\texplanations: z.array(z.string()).default([]),\n\t\textensions: z.array(z.union([z.string(), zExtension])).default([]),\n\t\tignores: z.array(z.string()).default([]),\n\t\timports: z.array(zPackageImport).default([]),\n\t\trules: zExtensionRules.optional(),\n\t\tsettings: z.record(z.string(), z.unknown()).optional(),\n\t},\n\tintake({ files }) {\n\t\tconst eslintConfigRaw = intakeFile(files, [\n\t\t\t[\"eslint.config.js\", \"eslint.config.mjs\"],\n\t\t]);\n\n\t\treturn eslintConfigRaw ? blockESLintIntake(eslintConfigRaw[0]) : undefined;\n\t},\n\tproduce({ addons, options }) {\n\t\tconst { explanations, extensions, ignores, imports, rules, settings } =\n\t\t\taddons;\n\n\t\tconst [configFileName, fileExtensions] =\n\t\t\toptions.type === \"commonjs\"\n\t\t\t\t? [\"eslint.config.mjs\", \"js,mjs,ts\"]\n\t\t\t\t: [\"eslint.config.js\", \"js,ts\"];\n\n\t\tconst explanation =\n\t\t\texplanations.length > 0\n\t\t\t\t? `${explanations\n\t\t\t\t\t\t.map((explanation) => `/*\\n${explanation}\\n*/\\n`)\n\t\t\t\t\t\t.join(\"\")}\\n`\n\t\t\t\t: \"\";\n\n\t\tconst importLines = [\n\t\t\t'import eslint from \"@eslint/js\";',\n\t\t\t'import tseslint from \"typescript-eslint\";',\n\t\t\t...imports.map(\n\t\t\t\t(packageImport) =>\n\t\t\t\t\t`import ${packageImport.specifier} from \"${typeof packageImport.source === \"string\" ? packageImport.source : packageImport.source.packageName}\"`,\n\t\t\t),\n\t\t].sort((a, b) =>\n\t\t\ta.replace(/.+from/, \"\").localeCompare(b.replace(/.+from/, \"\")),\n\t\t);\n\n\t\tconst ignoreLines = Array.from(\n\t\t\tnew Set(\n\t\t\t\t[\"lib\", \"node_modules\", \"pnpm-lock.yaml\", ...ignores].map((ignore) =>\n\t\t\t\t\tJSON.stringify(ignore),\n\t\t\t\t),\n\t\t\t),\n\t\t).sort();\n\n\t\tconst extensionLines = [\n\t\t\tprintExtension({\n\t\t\t\textends: [\n\t\t\t\t\t\"tseslint.configs.strictTypeChecked\",\n\t\t\t\t\t\"tseslint.configs.stylisticTypeChecked\",\n\t\t\t\t],\n\t\t\t\tfiles: [`**/*.{${fileExtensions}}`],\n\t\t\t\tlanguageOptions: {\n\t\t\t\t\tparserOptions: {\n\t\t\t\t\t\tprojectService: {\n\t\t\t\t\t\t\tallowDefaultProject: Array.from(\n\t\t\t\t\t\t\t\tnew Set(\n\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\"*.config.*s\",\n\t\t\t\t\t\t\t\t\t\t...(typeof options.bin === \"object\"\n\t\t\t\t\t\t\t\t\t\t\t? Object.values(options.bin)\n\t\t\t\t\t\t\t\t\t\t\t: [options.bin]),\n\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t.filter(Boolean)\n\t\t\t\t\t\t\t\t\t\t.sort(),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttsconfigRootDir: \"import.meta.dirname\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t...(rules && { rules }),\n\t\t\t\t...(settings && { settings }),\n\t\t\t}),\n\t\t\t...(options.type === \"commonjs\"\n\t\t\t\t? [\n\t\t\t\t\t\tprintExtension({\n\t\t\t\t\t\t\tfiles: [\"*.mjs\"],\n\t\t\t\t\t\t\tlanguageOptions: { sourceType: \"module\" },\n\t\t\t\t\t\t}),\n\t\t\t\t\t]\n\t\t\t\t: []),\n\t\t\t...extensions.map((extension) =>\n\t\t\t\ttypeof extension === \"string\" ? extension : printExtension(extension),\n\t\t\t),\n\t\t]\n\t\t\t.sort((a, b) => processForSort(a).localeCompare(processForSort(b)))\n\t\t\t.map((t) => t);\n\n\t\treturn {\n\t\t\taddons: [\n\t\t\t\tblockDevelopmentDocs({\n\t\t\t\t\tsections: {\n\t\t\t\t\t\tLinting: {\n\t\t\t\t\t\t\tcontents: {\n\t\t\t\t\t\t\t\tafter: [\n\t\t\t\t\t\t\t\t\t`\nFor example, ESLint can be run with \\`--fix\\` to auto-fix some lint rule complaints:\n\n\\`\\`\\`shell\npnpm run lint --fix\n\\`\\`\\`\n`,\n\t\t\t\t\t\t\t\t\t...(addons.beforeLint ? [addons.beforeLint] : []),\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\tbefore: `\nThis package includes several forms of linting to enforce consistent code quality and styling.\nEach should be shown in VS Code, and can be run manually on the command-line:\n`,\n\t\t\t\t\t\t\t\titems: [\n\t\t\t\t\t\t\t\t\t`- \\`pnpm lint\\` ([ESLint](https://eslint.org) with [typescript-eslint](https://typescript-eslint.io)): Lints JavaScript and TypeScript source files`,\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\tplural: `Read the individual documentation for each linter to understand how it can be configured and used best.`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockGitHubActionsCI({\n\t\t\t\t\tjobs: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: \"Lint\",\n\t\t\t\t\t\t\tsteps: [\n\t\t\t\t\t\t\t\t...(options.bin ? [{ run: \"pnpm build\" }] : []),\n\t\t\t\t\t\t\t\t{ run: \"pnpm lint\" },\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}),\n\t\t\t\tblockPackageJson({\n\t\t\t\t\tproperties: {\n\t\t\t\t\t\tdevDependencies: {\n\t\t\t\t\t\t\t...getPackageDependencies(\n\t\t\t\t\t\t\t\t\"@eslint/js\",\n\t\t\t\t\t\t\t\t\"@types/node\",\n\t\t\t\t\t\t\t\t\"eslint\",\n\t\t\t\t\t\t\t\t\"typescript-eslint\",\n\t\t\t\t\t\t\t\t...imports\n\t\t\t\t\t\t\t\t\t.filter((imported) => typeof imported.source === \"string\")\n\t\t\t\t\t\t\t\t\t.flatMap(({ source, types }) => {\n\t\t\t\t\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-call -- https://github.com/egoist/parse-package-name/issues/30\n\t\t\t\t\t\t\t\t\t\tconst { name } = parsePackageName(source) as {\n\t\t\t\t\t\t\t\t\t\t\tname: string;\n\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\treturn types ? [name, `@types/${name}`] : [name];\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t...Object.fromEntries(\n\t\t\t\t\t\t\t\timports\n\t\t\t\t\t\t\t\t\t.filter(\n\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\timported,\n\t\t\t\t\t\t\t\t\t\t): imported is typeof imported & { source: object } =>\n\t\t\t\t\t\t\t\t\t\t\ttypeof imported.source === \"object\",\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t.map((imported) => [\n\t\t\t\t\t\t\t\t\t\timported.source.packageName,\n\t\t\t\t\t\t\t\t\t\timported.source.version,\n\t\t\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tscripts: {\n\t\t\t\t\t\t\tlint: \"eslint . --max-warnings 0\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockVSCode({\n\t\t\t\t\textensions: [\"dbaeumer.vscode-eslint\"],\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\"editor.codeActionsOnSave\": {\n\t\t\t\t\t\t\t\"source.fixAll.eslint\": \"explicit\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"eslint.probe\": [\n\t\t\t\t\t\t\t\"javascript\",\n\t\t\t\t\t\t\t\"javascriptreact\",\n\t\t\t\t\t\t\t\"json\",\n\t\t\t\t\t\t\t\"jsonc\",\n\t\t\t\t\t\t\t\"markdown\",\n\t\t\t\t\t\t\t\"typescript\",\n\t\t\t\t\t\t\t\"typescriptreact\",\n\t\t\t\t\t\t\t\"yaml\",\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"eslint.rules.customizations\": [{ rule: \"*\", severity: \"warn\" }],\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t],\n\t\t\tfiles: {\n\t\t\t\t[configFileName]: `${explanation}${importLines.join(\"\\n\")}\n\nexport default tseslint.config(\n\t{ ignores: [${ignoreLines.join(\", \")}] },\n\t${printExtension({\n\t\tlinterOptions: { reportUnusedDisableDirectives: \"error\" },\n\t})},\n\teslint.configs.recommended,\n\t${extensionLines.join(\",\")}\n);`,\n\t\t\t},\n\t\t\tscripts: [\n\t\t\t\t{\n\t\t\t\t\tcommands: [\"pnpm lint --fix\"],\n\t\t\t\t\tphase: CommandPhase.Process,\n\t\t\t\t},\n\t\t\t],\n\t\t};\n\t},\n\ttransition({ options }) {\n\t\treturn {\n\t\t\taddons: [\n\t\t\t\tblockRemoveDependencies({\n\t\t\t\t\tdependencies: [\n\t\t\t\t\t\t\"@types/eslint\",\n\t\t\t\t\t\t\"@typescript-eslint/eslint-plugin\",\n\t\t\t\t\t\t\"@typescript-eslint/parser\",\n\t\t\t\t\t\t\"eslint-plugin-deprecation\",\n\t\t\t\t\t\t\"eslint-plugin-eslint-comments\",\n\t\t\t\t\t\t\"eslint-plugin-no-only-tests\",\n\t\t\t\t\t\t\"yaml-eslint-parser\",\n\t\t\t\t\t],\n\t\t\t\t}),\n\t\t\t\tblockRemoveFiles({\n\t\t\t\t\tfiles: [\n\t\t\t\t\t\t\".eslintrc*\",\n\t\t\t\t\t\t\".eslintignore\",\n\t\t\t\t\t\toptions.type === \"commonjs\"\n\t\t\t\t\t\t\t? \"eslint.config.{cjs,js}\"\n\t\t\t\t\t\t\t: \"eslint.config.{cjs,mjs}\",\n\t\t\t\t\t],\n\t\t\t\t}),\n\t\t\t\tblockRemoveWorkflows({\n\t\t\t\t\tworkflows: [\"eslint\", \"lint\"],\n\t\t\t\t}),\n\t\t\t],\n\t\t};\n\t},\n});\n\nfunction groupByComment(rulesGroups: ExtensionRuleGroup[]) {\n\tconst byComment = new Map<string | undefined, ExtensionRuleGroup>();\n\tconst grouped: typeof rulesGroups = [];\n\n\tfor (const group of rulesGroups) {\n\t\tconst existing = byComment.get(group.comment);\n\n\t\tif (existing) {\n\t\t\texisting.entries = {\n\t\t\t\t...existing.entries,\n\t\t\t\t...group.entries,\n\t\t\t};\n\t\t\tcontinue;\n\t\t} else {\n\t\t\tbyComment.set(group.comment, group);\n\t\t\tgrouped.push(group);\n\t\t}\n\t}\n\n\treturn grouped;\n}\n\nfunction printExtension(extension: Extension) {\n\treturn [\n\t\t\"{\",\n\t\textension.extends && `extends: [${extension.extends.join(\", \")}],`,\n\t\textension.files &&\n\t\t\t`files: [${extension.files.map((glob) => JSON.stringify(glob)).join(\", \")}],`,\n\t\textension.languageOptions &&\n\t\t\t`languageOptions: ${JSON.stringify(extension.languageOptions).replace('\"import.meta.dirname\"', \"import.meta.dirname\")},`,\n\t\textension.linterOptions &&\n\t\t\t`linterOptions: ${JSON.stringify(extension.linterOptions)}`,\n\t\textension.rules && `rules: ${printExtensionRules(extension.rules)},`,\n\t\textension.settings &&\n\t\t\t`settings: ${JSON.stringify(sortKeys(extension.settings))},`,\n\t\t\"}\",\n\t]\n\t\t.filter(Boolean)\n\t\t.join(\" \");\n}\n\nfunction printExtensionRules(rules: ExtensionRules) {\n\tif (!Array.isArray(rules)) {\n\t\treturn JSON.stringify(rules);\n\t}\n\n\treturn [\n\t\t\"{\",\n\t\t...groupByComment(rules).flatMap((group) => [\n\t\t\tprintGroupComment(group.comment),\n\t\t\t...Object.entries(group.entries).map(\n\t\t\t\t([ruleName, options]) => `\"${ruleName}\": ${JSON.stringify(options)},`,\n\t\t\t),\n\t\t]),\n\t\t\"}\",\n\t].join(\"\");\n}\n\nfunction printGroupComment(comment: string | undefined) {\n\treturn comment ? `\\n\\n// ${comment.replaceAll(\"\\n\", \"\\n// \")}\\n` : \"\";\n}\n\nfunction processForSort(line: string) {\n\tif (line.startsWith(\"...\") || /\\w+/.test(line[0])) {\n\t\treturn `A\\n${line.replaceAll(/\\W+/g, \"\")}`;\n\t}\n\n\treturn `B\\n${(/files: (.+)/.exec(line)?.[1] ?? line).replaceAll(/\\W+/g, \"\")}`;\n}\n"],"mappings":"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"}
|
|
@@ -1,72 +1,75 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as bingo_stratum292 from "bingo-stratum";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
development?: string | undefined;
|
|
15
|
-
};
|
|
16
|
-
email: {
|
|
17
|
-
github: string;
|
|
18
|
-
npm: string;
|
|
3
|
+
//#region src/blocks/blockESLintComments.d.ts
|
|
4
|
+
declare const blockESLintComments: bingo_stratum292.BlockWithoutAddons<{
|
|
5
|
+
access: "public" | "restricted";
|
|
6
|
+
description: string;
|
|
7
|
+
directory: string;
|
|
8
|
+
documentation: {
|
|
9
|
+
readme: {
|
|
10
|
+
additional?: string | undefined;
|
|
11
|
+
explainer?: string | undefined;
|
|
12
|
+
footnotes?: string | undefined;
|
|
13
|
+
usage?: string | undefined;
|
|
19
14
|
};
|
|
15
|
+
development?: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
email: {
|
|
18
|
+
github: string;
|
|
19
|
+
npm: string;
|
|
20
|
+
};
|
|
21
|
+
title: string;
|
|
22
|
+
node: {
|
|
23
|
+
minimum: string;
|
|
24
|
+
pinned?: string | undefined;
|
|
25
|
+
};
|
|
26
|
+
owner: string;
|
|
27
|
+
repository: string;
|
|
28
|
+
type?: "commonjs" | "module" | undefined;
|
|
29
|
+
author?: string | undefined;
|
|
30
|
+
bin?: string | Record<string, string> | undefined;
|
|
31
|
+
contributors?: {
|
|
32
|
+
avatar_url: string;
|
|
33
|
+
contributions: string[];
|
|
34
|
+
login: string;
|
|
35
|
+
name: string;
|
|
36
|
+
profile: string;
|
|
37
|
+
}[] | undefined;
|
|
38
|
+
emoji?: string | undefined;
|
|
39
|
+
existingLabels?: {
|
|
40
|
+
name: string;
|
|
41
|
+
description: string;
|
|
42
|
+
color: string;
|
|
43
|
+
}[] | undefined;
|
|
44
|
+
funding?: string | undefined;
|
|
45
|
+
guide?: {
|
|
46
|
+
href: string;
|
|
20
47
|
title: string;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
guide?: {
|
|
45
|
-
href: string;
|
|
46
|
-
title: string;
|
|
47
|
-
} | undefined;
|
|
48
|
-
keywords?: string[] | undefined;
|
|
49
|
-
logo?: {
|
|
50
|
-
alt: string;
|
|
51
|
-
src: string;
|
|
52
|
-
height?: number | undefined;
|
|
53
|
-
width?: number | undefined;
|
|
54
|
-
} | undefined;
|
|
55
|
-
packageData?: {
|
|
56
|
-
dependencies?: Record<string, string> | undefined;
|
|
57
|
-
devDependencies?: Record<string, string> | undefined;
|
|
58
|
-
peerDependencies?: Record<string, string> | undefined;
|
|
59
|
-
peerDependenciesMeta?: Record<string, unknown> | undefined;
|
|
60
|
-
scripts?: Record<string, string | undefined> | undefined;
|
|
61
|
-
} | undefined;
|
|
62
|
-
pnpm?: string | undefined;
|
|
63
|
-
rulesetId?: string | undefined;
|
|
64
|
-
version?: string | undefined;
|
|
65
|
-
words?: string[] | undefined;
|
|
66
|
-
workflowsVersions?: Record<string, Record<string, {
|
|
67
|
-
pinned?: boolean | undefined;
|
|
68
|
-
hash?: string | undefined;
|
|
69
|
-
}>> | undefined;
|
|
48
|
+
} | undefined;
|
|
49
|
+
keywords?: string[] | undefined;
|
|
50
|
+
logo?: {
|
|
51
|
+
alt: string;
|
|
52
|
+
src: string;
|
|
53
|
+
height?: number | undefined;
|
|
54
|
+
width?: number | undefined;
|
|
55
|
+
} | undefined;
|
|
56
|
+
packageData?: {
|
|
57
|
+
dependencies?: Record<string, string> | undefined;
|
|
58
|
+
devDependencies?: Record<string, string> | undefined;
|
|
59
|
+
peerDependencies?: Record<string, string> | undefined;
|
|
60
|
+
peerDependenciesMeta?: Record<string, unknown> | undefined;
|
|
61
|
+
scripts?: Record<string, string | undefined> | undefined;
|
|
62
|
+
} | undefined;
|
|
63
|
+
pnpm?: string | undefined;
|
|
64
|
+
rulesetId?: string | undefined;
|
|
65
|
+
version?: string | undefined;
|
|
66
|
+
words?: string[] | undefined;
|
|
67
|
+
workflowsVersions?: Record<string, Record<string, {
|
|
68
|
+
hash?: string | undefined;
|
|
69
|
+
pinned?: boolean | undefined;
|
|
70
|
+
}>> | undefined;
|
|
70
71
|
}>;
|
|
71
|
-
|
|
72
|
+
//# sourceMappingURL=blockESLintComments.d.ts.map
|
|
73
|
+
//#endregion
|
|
72
74
|
export { blockESLintComments };
|
|
75
|
+
//# sourceMappingURL=blockESLintComments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blockESLintComments.d.ts","names":[],"sources":["../../src/blocks/blockESLintComments.ts"],"sourcesContent":[],"mappings":";;;cAGa,sCAAmB;;;EAAnB,SAAA,EAAA,MAAA;EAmBX,aAAA,EAAA;IAAA,MAAA,EAAA;;;;;;;;;IAnB8B,MAAA,EAAA,MAAA;;;;;;;;;;;;iBAmB9B"}
|