A minimalistic template for JavaScript/TypeScript projects that use Cursor/VSCode and Claude Code. Uses Bun, Biome, and TypeScript.
- Bun installed
- Cursor
- Biome
- Initialise Bun
bun init- Add development packages
bun add --dev @biomejs/biome typescript- Add
biome.jsonto your folder with:
{
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
"organizeImports": { "enabled": true },
"formatter": { "indentStyle": "space", "indentWidth": 4, "lineWidth": 100 },
"linter": { "rules": { "recommended": true } }
}- Add
.vscode/settings.jsonto your folder
-
Copy (not clone) this template to your new project
-
Update the following files with your package name:
package.json: Updatename,author,repository,bugs, andhomepagerelease-please-config.json: Updatepackage-namesrc/index.ts: Update SPDX headertests/index.test.ts: Update SPDX header
-
Initialise the project:
bun install- Run the checks:
bun run check
bun run typecheck
bun testThis template includes GitHub Actions workflows for continuous integration and release automation.
| Workflow | Trigger | Description |
|---|---|---|
| CI | Push/PR to main | Runs Biome, TypeScript, and Bun test with coverage |
| Release Please | Push to main | Creates releases with changelogs and publishes to npm (optional) |
This template uses release-please for automated releases. Use conventional commits to trigger version bumps.
| Commit prefix | Version bump | Description |
|---|---|---|
feat!: |
Major (x.0.0) | Breaking changes that require major version bump |
feat: |
Minor (0.x.0) | New features that add functionality |
fix: |
Patch (0.0.x) | Bug fixes |
perf: |
Patch (0.0.x) | Performance improvements |
build: |
None | Build system or dependency changes |
chore: |
None | Maintenance tasks that don't affect production code |
ci: |
None | CI/CD configuration changes |
docs: |
None | Documentation updates |
refactor: |
None | Code restructuring without behavior changes |
revert: |
None | Reverting previous commits |
style: |
None | Code formatting changes |
test: |
None | Adding or updating tests |
- Make commits using conventional commit format
- Push to
mainbranch - Release Please automatically creates/updates a Release PR
- When ready, merge the Release PR
- A GitHub Release is created and (if configured) the package is published to npm automatically
The release-please.yml workflow includes npm publishing but requires setup.
To enable npm publishing:
-
Create an npm account at https://www.npmjs.com
-
Generate an Access Token on npm:
- Go to https://www.npmjs.com/settings/~/tokens
- Generate a new "Automation" token
- Copy the token value
-
Add Token to GitHub Secrets:
- Go to your repo Settings → Secrets and variables → Actions
- Add a new repository secret named
NPM_TOKENwith the token value
-
Create GitHub Environment:
- Go to your repo Settings → Environments
- Create a new environment named
npm
The first release will publish your package to npm.
If you don't want to publish to npm, remove the build and publish jobs from .github/workflows/release-please.yml. The release workflow will still create GitHub releases with changelogs.
Protect your main branch to prevent accidental pushes and ensure code quality:
- Go to Settings → Branches → Add classic branch protection rule
- Branch name pattern:
main - Enable the following:
- Require a pull request before merging
- Require approvals: 1
- Dismiss stale pull request approvals when new commits are pushed
- Require status checks to pass before merging
- Require branches to be up to date before merging
- Add status checks (after your first CI run):
Lint & FormatType CheckTest
- Require linear history
- Require a pull request before merging
These rules ensure all code goes through PR review and passes CI checks before merging to main.
Enforce linear history and clean commits:
- Go to Settings → General → Pull Requests
- Check the following:
- Allow squash merging
- Automatically delete head branches
- Uncheck the following:
- Allow merge commits
- Allow rebase merging
This ensures every PR becomes a single, clean commit on main with a proper conventional commit message.
Configure GitHub Actions permissions to allow Release Please to create pull requests:
For personal repositories:
- Go to repository Settings → Actions → General
- Scroll down to Workflow permissions
- Select "Read and write permissions"
- Check "Allow GitHub Actions to create and approve pull requests"
- Click Save
For organization repositories:
If the workflow permissions option is greyed out in your repository settings, you need to configure this at the organization level:
- Go to your organization Settings → Actions → General (requires organization owner permissions)
- Scroll down to Workflow permissions
- Select "Read and write permissions"
- Check "Allow GitHub Actions to create and approve pull requests"
- Click Save
Without these settings, the Release Please workflow will fail with: GitHub Actions is not permitted to create or approve pull requests
Enable Claude to respond to @claude mentions in PRs and issues:
claude
/install-github-appThis installs the Claude GitHub App and configures the workflow. Once set up, mention @claude in any PR or issue comment to get AI assistance with code reviews, bug fixes, and feature implementation.
your-project/
├── .github/
│ └── workflows/
│ ├── ci.yml # Lint, typecheck, test
│ └── release-please.yml # Automated releases + npm publishing
├── src/
│ └── index.ts # Main entry point (version updated by release-please)
├── tests/
│ └── index.test.ts
├── .vscode/
│ └── settings.json
├── biome.json
├── tsconfig.json
├── package.json
├── release-please-config.json
├── .release-please-manifest.json
└── README.md