Presets are pre-configured combinations of blocks that represent common TypeScript project configurations, from minimal setups to full-featured development environments.
Object containing all available presets for quick project configuration selection.
/**
* Collection of predefined block combinations for common project types
* Each preset represents a different level of tooling and configuration
*/
const presets: {
/** Bare minimum configuration for basic TypeScript projects */
minimal: Preset;
/** Common configuration with testing and automation tools */
common: Preset;
/** Full-featured configuration with all available tooling */
everything: Preset;
};Bare minimum configuration for basic TypeScript projects with essential tooling only.
/**
* Minimal preset for simple TypeScript projects
* Includes only essential blocks for basic functionality
*/
const presetMinimal: Preset;Included Blocks:
blockContributingDocs: Contributing guidelines and documentationblockContributorCovenant: Code of conduct with Contributor CovenantblockDevelopmentDocs: Development documentation and setup guidesblockESLint: Core ESLint configuration with TypeScript supportblockExampleFiles: Example source files and templatesblockGitHubActionsCI: GitHub Actions continuous integration workflowblockGitHubApps: GitHub Apps configuration and integrationblockGitHubIssueTemplates: Issue templates for bug reports and featuresblockGitHubPRTemplate: Pull request template for contributionsblockGitignore: Git ignore patterns for TypeScript projectsblockMain: Main project entry point configurationblockMITLicense: MIT License file generationblockPackageJson: Package.json configuration and metadatablockPrettier: Code formatting with PrettierblockREADME: Project README with badges and documentationblockRemoveDependencies: Cleanup of unnecessary dependenciesblockRemoveFiles: Removal of template and unused filesblockRemoveWorkflows: Cleanup of unwanted GitHub workflowsblockRepositoryBranchRuleset: GitHub branch protection rulesblockRepositoryLabels: Standard GitHub issue and PR labelsblockRepositorySecrets: GitHub repository secrets configurationblockRepositorySettings: Repository settings and configurationblockSecurityDocs: Security policy and vulnerability reportingblockTemplatedWith: Template attribution and metadatablockTSDown: TypeScript build system with tsdownblockTypeScript: Core TypeScript configuration and setupUse Cases:
Example Usage:
import { createConfig } from "create-typescript-app";
const config = createConfig({
directory: "./simple-project",
title: "Simple TypeScript Project",
repository: "simple-project",
owner: "username",
preset: "minimal"
});Balanced configuration including testing and automation for typical TypeScript projects.
/**
* Common preset with testing and automation tools
* Includes all minimal blocks plus testing, coverage, and release automation
*/
const presetCommon: Preset;Included Blocks:
presetMinimalblockAllContributors: Contributor recognition systemblockCodecov: Test coverage reportingblockFunding: GitHub Sponsors integrationblockOctoGuide: Development workflow documentationblockReleaseIt: Automated release managementblockVitest: Modern testing frameworkAdditional Features:
Use Cases:
Example Usage:
import { createConfig } from "create-typescript-app";
const config = createConfig({
directory: "./my-library",
title: "My TypeScript Library",
repository: "my-typescript-library",
owner: "my-organization",
description: "A well-tested TypeScript library with automated releases.",
preset: "common",
author: "npm-username",
access: "public"
});Full-featured configuration with comprehensive tooling for enterprise-grade TypeScript projects.
/**
* Everything preset with all available tooling and configuration
* Includes comprehensive linting, formatting, testing, and automation
*/
const presetEverything: Preset;Included Blocks:
presetCommon (includes all 22 blocks from minimal plus 6 additional blocks)blockESLintComments: Comment validation and best practicesblockESLintJSDoc: JSDoc enforcement and validationblockESLintJSONC: JSON and JSONC file lintingblockESLintMarkdown: Markdown file lintingblockESLintMoreStyling: Additional styling and formatting rulesblockESLintNode: Node.js specific linting rulesblockESLintPackageJson: Package.json validation and formattingblockESLintPerfectionist: Import/export sorting and organizationblockESLintRegexp: Regular expression validation and optimizationblockESLintYML: YAML file linting and validationblockCSpell: Spell checking for code and documentationblockKnip: Dead code detection and cleanupblockMarkdownlint: Markdown documentation lintingblockNvmrc: Node Version Manager configurationblockPnpmDedupe: pnpm dependency optimizationblockOctoGuideStrict: Strict development workflow documentationblockPrettierPluginCurly: Curly brace formatting consistencyblockPrettierPluginPackageJson: Package.json formattingblockPrettierPluginSh: Shell script formattingblockRenovate: Automated dependency updatesblockVSCode: VS Code workspace configurationAdditional Features:
Use Cases:
Example Usage:
import { createConfig } from "create-typescript-app";
const config = createConfig({
directory: "./enterprise-project",
title: "Enterprise TypeScript Application",
repository: "enterprise-typescript-app",
owner: "enterprise-org",
description: "A comprehensive enterprise-grade TypeScript application.",
preset: "everything",
author: "enterprise-team",
email: {
github: "team@enterprise.com",
npm: "npm-team@enterprise.com"
},
access: "public",
node: {
minimum: "20.19.0",
pinned: "24.3.0"
},
keywords: ["typescript", "enterprise", "library"],
funding: "enterprise-org"
});While presets provide convenient starting points, individual blocks can be customized or combined for specific project needs:
import { blocks, createConfig } from "create-typescript-app";
// Access individual blocks for custom combinations
const {
blockTypeScript,
blockESLint,
blockVitest,
blockPrettier,
blockGitHubActionsCI
} = blocks;
// Create configuration with custom block selection
// (Block selection typically handled through template configuration)
const customConfig = createConfig({
directory: "./custom-project",
title: "Custom TypeScript Project",
repository: "custom-project",
owner: "username",
// Custom block combinations configured through template system
});