Skip to content

Repository files navigation

template-node

ci template mise license

A sane, opinionated template for ESM Node.js projects written in TypeScript without a transpilation step — TypeScript is executed directly by Node.js.

Note

This template includes an Arch Linux Dev Container based on mise-devcontainers, providing a consistent development environment with mise preconfigured.

mise manages the project-specific runtimes, tools, and tasks inside the container, so it does not need to be installed on the host.

Uses, among other tools/packages:

requirements and dependencies

To use the included Dev Container you need:

  • Docker or a compatible container runtime
  • a Dev Container-compatible editor or the Dev Container CLI
  • an SSH agent exposed through SSH_AUTH_SOCK with at least one key loaded

The SSH agent is forwarded into the container for Git authentication and commit signing. Private keys remain on the host.

Once inside the container, install the project dependencies:

pnpm install

The project-specific runtimes and development tools are managed by mise.

If you prefer not to use the Dev Container, install mise locally and run mise install before installing the project dependencies.

Note

Git hooks keep the tooling managed by mise and the project dependencies synchronized after checkouts and merges.

subpath imports

Subpath imports (#/) are used instead of relative paths. They are mapped through the imports field in package.json, allowing native Node.js resolution at runtime without additional build tooling, and mirrored in tsconfig.json for editor support.

Example:

import { add } from "#/lib/math"; // ./src/lib/math.ts

running

mise dev

Runs the project in watch mode.

mise test

Runs the tests.

mise lint-fix

Runs Biome in fix mode to lint and format the project.

mise typecheck

Runs TypeScript type checking.

ci

CI is provided by GitHub Actions through .github/workflows/checks.yml.

It runs:

  • Biome linting and formatting checks
  • TypeScript type checking
  • Vitest tests

license

MIT

About

A template for esm Node.js projects using typescript

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages