# Configure TypeScript Toolchain for Xberg Projects

Set up TypeScript tooling for Xberg projects with pnpm, Vitest, and integration-specific configurations.

**Canonical URL:** https://skillshunter.net/skills/github-xberg-io-xberg-ai-rulez-skills-xberg-typescript-toolchain-bf26299a1771

**JSON URL:** https://skillshunter.net/api/public/v1/skills/github-xberg-io-xberg-ai-rulez-skills-xberg-typescript-toolchain-bf26299a1771

**Markdown URL:** https://skillshunter.net/skills/github-xberg-io-xberg-ai-rulez-skills-xberg-typescript-toolchain-bf26299a1771.md

**Instructions download URL:** https://skillshunter.net/skills/github-xberg-io-xberg-ai-rulez-skills-xberg-typescript-toolchain-bf26299a1771/download

**Category:** Software & Development

**Source URL:** https://github.com/xberg-io/xberg/blob/ffbf7971796a126fc52f6bb8fb40418772071f61/.ai-rulez/skills/xberg-typescript-toolchain/SKILL.md

**Source commit:** ffbf7971796a126fc52f6bb8fb40418772071f61

**Listing approved at:** 2026-11-16

**Created at:** 2026-11-15T13:52:45.000000Z

**Updated at:** 2026-11-16T05:16:54.000000Z

## Catalog information

The following descriptions are catalog information. Listing approval does not mean the skill has been tested or is safe for every environment.

### Editor's note

The setup requires a working knowledge of TypeScript and familiarity with Xberg's project structure, including the use of `poly lint .` and `poly fmt .` for linting and formatting.

### When to use it

- Setting up TypeScript for a new Xberg project
- Configuring tooling for integration tests with Vitest
- Setting up linting and formatting with Poly

## Skill instructions

---
type: Playbook
title: Xberg Typescript Toolchain
description: "Change TS/JS tooling: pnpm/npm locks, Vitest, napi-rs, wasm-pack and integrations."
paths:
  - "crates/xberg-node/**"
  - "crates/xberg-wasm/**"
  - "integrations/node/**"
  - "e2e/node/**"
  - "e2e/wasm/**"
  - "package.json"
  - "tsconfig.json"
x-ai-rulez:
  kind: skill
  id: xberg-typescript-toolchain
  metadata:
    name: xberg-typescript-toolchain
---

# Xberg TypeScript toolchain

These repository-specific facts override generic TypeScript conventions where they differ.

- Lint and format with `poly lint .` and `poly fmt .`. Poly embeds oxlint and oxfmt; do not install or invoke oxlint,
  oxfmt, Prettier, ESLint, or Biome directly, and do not add per-package lint scripts.
- Root `tsconfig.json` enables strict checking options and is a project-reference root for `e2e/node` and `e2e/wasm`.
  Confirm that the package being changed is included before treating a root typecheck as evidence.
- Testing uses Vitest with `@vitest/coverage-v8`. No coverage threshold is enforced unless one is added to current
  configuration.
- No runtime schema-validator dependency is guaranteed. Use existing boundary guards or propose a dependency
  explicitly rather than assuming Zod is available.
- The pnpm workspace uses the root lockfile. Packages under `integrations/node/` are outside that workspace and use
  their own npm lockfiles. Determine ownership before installing or updating dependencies.
- `integrations/node/{langchain,llamaindex}-xberg` use tsup. The Node binding is built by napi-rs and the WASM binding
  by wasm-pack; do not add an application bundler to either binding.
- Prefer `workspace:*` for new dependencies between packages that are actually in the pnpm workspace.
- JavaScript dependency auditing is manual unless a current workflow says otherwise; do not claim an audit ran merely
  because Rust or poly checks passed.

