A quickstart-friendly TypeScript template with comprehensive formatting, linting, releases, testing, and other great tooling built-in. β¨
Note that this template is early stage, opinionated, and not endorsed by the TypeScript team. It sets up a lot of tooling out of the box. Each of the included tools exists for a good reason and provides real value.
If you don't want to use any particular tool, you can always remove it manually.
First make sure you have the following installed:
- GitHub CLI (you'll need to be logged in)
- Node.js
- pnpm
This repository comes with three script forms to set up an existing or new repository with tooling. Use the corresponding docs page to get started:
- Creating from the terminal: creating a new repository locally on the command-line (recommended)
- Initializing from the template: creating a new repository with the Use this template button on GitHub
- Migrating an existing repository: adding this template's tooling on top of an existing repository
This template is available for anybody who wants to set up a Node application using TypeScript. It sets up the following tooling for you:
- All Contributors: Tracks various kinds of contributions and displays them in a nicely formatted table in the README.md.
- ESLint: Static analysis for JavaScript code, configured with typescript-eslint for TypeScript code and other general-use plugins.
- Knip: Detects unused files, dependencies, and code exports.
- Markdownlint: Static analysis for Markdown code.
- pnpm: Disk-efficient package manager alternative.
- PR Compliance Action: Checks PRs for compliance such as addressing a linked issue and proper title formatting.
- Prettier: Opinionated formatting for code, run on file save and as a Git commit hook via husky and lint-staged.
- release-it: Generates changelogs, bumps the package version, and publishes to GitHub and npm based on conventional commits.
- Renovate: Keeps dependencies up-to-date with PRs, configured to wait a few days after each update for safety.
- tsup: Builds output definitions and JavaScript files using esbuild.
- TypeScript: A typed superset of JavaScript, configured with strict compiler options.
- Vitest: Fast unit tests, configured with coverage tracking and console-fail-test.
See .github/CONTRIBUTING.md
, then .github/DEVELOPMENT.md
.
Thanks! π