Skip to content

Repository files navigation

🚀 TypeScript Workflow Template

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.

🛠️ Built-In Tooling & Plugins

This template integrates a suite of automated workflows and git hooks categorized by their function:

Code Quality & Formatting

  • 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.

Commit & Git Workflow

Project & Automation

  • Semantic Release: Fully automates the package release workflow, determining version numbers and generating changelogs based on commit history.
  • Renovate: Keeps your npm packages and GitHub Actions automatically updated via automated PRs.

Issue & Label Management

Security & CI/CD

  • 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.

🚀 Getting Started

1. Generate Your Repository

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.

2. Setup Repository

  • Install Github Apps
    • Grant these apps permission to your newly generated repository.
  • Sync Repository Labels:
    1. Navigate to your new repository on GitHub and click on the Actions tab.
    2. Select Sync Labels from the left sidebar.
    3. Click the Run workflow dropdown menu on the right and trigger it manually.

Labels Labels

  • Notes:

3. Local Setup

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 standard git commit commands 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: Runs ultracite fix on your staged files to handle formatting, linting, and type-aware diagnostics. Any automatically fixed files are re-staged before the commit completes.

📋 Available Scripts

  • npm run fix — Run both oxlint and oxfmt with 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 on npm 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.

📁 Repository Structure

│   .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

About

TypeScript repository template pre-configured with a modern tooling ecosystem to automate code quality, git workflows, dependency management, and CI/CD pipelines.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages