This is the code kata template for TypeScript created by Aula de Software Libre de la Universidad de Córdoba
You can use this repository as a template or open it directly by clicking here:
Codespaces installs all dependencies automatically. If you prefer to install locally, follow these steps.
You need Node.js 24 or later. Enable pnpm if you don't have it yet:
corepack enable
Then, in the project folder, run:
pnpm install
After that you will be ready to code.
| Command | What it does |
|---|---|
pnpm test |
Runs the tests in watch mode |
pnpm test:ci |
Runs the tests once |
pnpm run check |
Checks format, lint rules and types without changing anything |
pnpm run fix |
Fixes format and lint issues automatically |
pnpm run all |
Runs fix and then the tests once |
pnpm run ci |
Runs check and then the tests once (what GitHub Actions does) |
Install the recommended extensions (VS Code suggests them when you open the project). The Vitest extension shows the test tree and lets you run and debug tests from the editor.
Install the recommended extensions (VS Code suggests them when you open the project). The Vitest extension shows the test tree and lets you run and debug tests from the editor.
- Code lives in
src/. Each test sits next to the code it tests and is named*.spec.ts. - Tests use
it(...)from Vitest. - Functions are declared with
function; arrow functions are for callbacks. - Linting and formatting use Ultracite with Oxlint and Oxfmt, including type checking. A
pre-commithook (Lefthook) runspnpm run fixon staged files.