Template TypeScript Node.js package with all the CI bells & whistles I commonly use. ✨
This template is available for anybody who wants to set up a basic Node application using TypeScript. It sets up the following tooling for you:
- ESLint: Static analysis for JavaScript code, configured with typescript-eslint for TypeScript code and other general-use plugins.
- Markdownlint: Static analysis for Markdown code.
- pnpm: Desk-efficient package manager alternative.
- Prettier: Opinionated formatting for code, run on file save and as a Git commit hook via husky and lint-staged.
- ts-prune: Unused exports detection for TypeScript code.
- TypeScript: A typed superset of JavaScript, configured with strict compiler options.
- Vitest: Fast unit tests, configured with coverage tracking.
First make sure you have the following installed:
- GitHub CLI (you'll need to be logged in)
- Node.js
- pnpm
To use this template:
- Click the Use this template button to create a new repository with the same Git history
- Open that repository, such as by cloning it locally or developing in a codespace
pnpm install
pnpm run setup
The setup script removes the
## Explainer
and## Setup
from this README.md.
npm i template-typescript-node-package
import { greet } from "template-typescript-node-package"; greet("Hello, world!");
See .github/CONTRIBUTING.md
. Thanks! 💖
Josh Goldberg 🐛 💻 🖋 💡 🤔 🚇 🚧 📦 📆 👀 🛡️ 🔧 | Jeff Wen 🔧 |