Skip to content

Latest commit

 

History

History
105 lines (75 loc) · 4.13 KB

File metadata and controls

105 lines (75 loc) · 4.13 KB

@opinionated-ts/template

A ready-to-use TypeScript project template powered by @opinionated-ts/config that bundles opinionated tooling defaults for performance, code quality, and developer experience — so you can start building immediately without repetitive setup.

When to use this template?

Use this template when you want to:

  • Avoid repetitive TypeScript tooling setup
  • Standardize linting, formatting, and type-checking with clear defaults
  • Start from a modern Bun-first setup that is ready to use
  • Keep a consistent developer experience across repositories
  • Move fast without sacrificing code quality

Note

This template is designed primarily for Bun environments.

Getting started

1. Create your repo

Click Use this template above, or:

git clone https://github.com/opinionated-ts/template my-project
cd my-project
rm -rf .git && git init

2. Install dependencies

bun install

3. Install git hooks

bun hooks:install

4. Edit package metadata

Update package.json so releases and CI point to your project:

  • name: your package name.
  • repository.url: your repo's URL.
{
  "name": "your-project-name",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/your-username/your-repo.git"
  }
}

What's included

Local automatic validations

Category Tool Description
Type checking TypeScript Applied together with Oxlint via typeCheck/typeAware
Linter Oxlint Fast linting, pre-configured
Formatter Oxfmt Fast formatting, pre-configured
Spellchecking cspell Pre-configured for English/Spanish
Commit linting commitlint Enforces Conventional Commits
Git hooks lefthook Wired up locally (pre-commit, commit-msg, pre-push)

Remote automation support

The underlying config package also supports CI and release automation for projects that need it:

Category Tool Description
CI/CD GitHub Actions Automated validation and release pipelines
Release Semantic Release Automated versioning and publishing

All template configurations extend @opinionated-ts/config directly — see opinionated-ts/config for the shared defaults and the recommended overrides available for each tool.

How the workflow works

A few checks run automatically at key moments in the development cycle:

  • Before a commit, changed files are formatted, type-checked, and linted automatically (pre-commit, via Oxfmt and Oxlint).
  • When a commit message is written, it is validated against a consistent format (commit-msg, via commitlint).
  • Before a push, the test suite runs and dependencies are scanned for known vulnerabilities; either failure blocks the push (pre-push, via bun test and bun audit).

These checks run automatically as part of git commit and git push — no manual steps required.

Related projects