Welcome to the TypeScript Workflow Template repository! This repository comes pre-configured with a modern, high-performance tooling ecosystem designed to automate code quality, dependency management, commit standards, and seamless continuous integration.
This template integrates a suite of automated workflows and git hooks categorized by their function:
- Ultracite: Orchestrates ultra-fast linting and formatting powered internally by oxlint and oxfmt.
- Autofix: Automatically fixes linting and formatting issues directly on your Pull Requests.
- Lefthook: A lightning-fast Git hooks manager that runs linters and commit checks locally before pushing.
- Commitlint: Enforces the Conventional Commits specification on your commit messages.
- Commitizen: Provides a command-line wizard to help you write formatted commit messages.
- Semantic Release: Fully automates the package release workflow, determining version numbers and generating changelogs based on commit history.
- Renovate: Keeps your
npmpackages and GitHub Actions automatically updated via automated PRs.
- Label Sync: Ensures standard issue labels are identical across your repositories.
- Advanced Issue Labeler: Dynamically assigns labels to new issues based on body content or template selection.
- Issue Forms: Pre-configured issue forms for streamlined Bug Reports and Feature Requests.
- CodeQL: Industry-grade static analysis engine by GitHub to discover vulnerabilities in your codebase.
- Node.js Build And Test Pipeline: Automatically validates type safety, runs unit tests, and verifies production builds on every PR.
Click the green "Use this template" button at the top right of this repository page or click Direct Template Link to instantly create a new repository in your own account.
- Install Github Apps
- Sync Repository Labels:
- Navigate to your new repository on GitHub and click on the Actions tab.
- Select Sync Labels from the left sidebar.
- Click the Run workflow dropdown menu on the right and trigger it manually.
- Notes:
- Advanced Issue Labeler auto-applies
sizeandprioritylabels selected in Bug Reports and Feature Requests (configured here). - Label Schema used for autocompletion in VS Code when modifying labels in Issue forms.
- Advanced Issue Labeler auto-applies
Run the following commands in your terminal to clone your newly generated repository and install the dependencies (this will automatically initialize your Git hooks):
# 1. Clone your new repo (Make sure to replace this with YOUR actual URL!)
git clone https://github.com
# 2. Move into the project directory
cd YOUR-NEW-REPOSITORY
# 3. Install dependencies and initialize git hooks
npm install⚓ Git Hooks (Lefthook Ecosystem)
This template uses Lefthook to automate checks locally before code ever leaves your machine. The following hooks are pre-configured:
prepare-commit-msg: Intercepts standardgit commitcommands to automatically launch the Commitizen in your terminal.commit-msg: Runs Commitlint against your commit message to guarantee it follows the Conventional Commits specification.pre-commit: Runsultracite fixon your staged files to handle formatting, linting, and type-aware diagnostics. Any automatically fixed files are re-staged before the commit completes.
npm run fix— Run bothoxlintandoxfmtwith Ultracite to auto-fix errors and format code.npm run check— Audit format and lint rules across all files without modifying them.npm run prepare— Syncs Lefthook hooks automatically onnpm install.npm run build— Compile the project for production. (Referenced by CodeQL Workflow)npm test— Run the local test suite. (Referenced by CodeQL Workflow)
Note: Define test and build commands in package.json. The CI pipeline runs these automatically if they are present, so you don't need to modify the workflow files.
│ .gitignore
│ .releaserc
│ commitlint.config.ts
│ lefthook.yml
│ oxfmt.config.ts
│ oxlint.config.ts
│ package-lock.json
│ package.json
│ README.md
│ renovate.json
│ tsconfig.json
│
├───.github
│ │ advanced-issue-labeler.yml
│ │ labels.yml
│ │
│ ├───ISSUE_TEMPLATE
│ │ bug_report.yml
│ │ config.yml
│ │ feature_request.yml
│ │
│ └───workflows
│ autofix.yml
│ codeql.yml
│ issue-labeler.yml
│ label-sync.yml
│ node.js.yml
│ release.yml
│
└───.vscode
extensions.json
labels-schema.json
settings.json
