Skip to main content

repo-context

Provides tech stack, package layout, conventions, and build commands for the iTwin/presentation monorepo. Use when: working on any package or app in this repo, planning changes, implementing features, reviewing code.

Informations de source

Dépôt
iTwin/presentation
Dernière activité de la source
14 septembre 2026 à 14:37
Langue détectée de SKILL.md
anglais
Étoiles
6
Forks
1

Options d'installation

Le prompt qui vérifie d'abord la source est sélectionné par défaut. Vous pouvez passer à une commande directe ou télécharger une copie locale.

Vérifiez les fichiers source

Lisez SKILL.md et les fichiers associés affichés par SkillsMP avant de décider de l'installer.

Affichage de SKILL.md

SKILL.md
Instructions source · Aperçu en lecture seule
name
repo-context
description
Provides tech stack, package layout, conventions, and build commands for the iTwin/presentation monorepo. Use when: working on any package or app in this repo, planning changes, implementing features, reviewing code.
# iTwin/presentation Repository Context ## Overview This is a **pnpm monorepo** orchestrated with **Lage** and versioned with **Changesets**. ## Tech Stack | Area | Technology | |------|-----------| | Language | TypeScript (strict, ES2022, dual CJS/ESM builds) | | UI | React 18, iTwinUI components, SCSS | | Testing | Vitest | | Linting | oxlint (type-aware, config in `.oxlintrc.json`); ESLint only for `@itwin/eslint-plugin` rules (`eslint.config.js`); oxfmt for formatting | | Platform | iTwin.js (iModels, ECSQL, Presentation APIs) | | Reactive | RxJS | | API docs | `@itwin/build-tools` (extract-api, docs) | | Node | ^24, pnpm 11 | ## Packages | Package | Path | Purpose | |---------|------|---------| | `@itwin/presentation-shared` | `packages/shared` | Shared utilities and types | | `@itwin/presentation-core-interop` | `packages/core-interop` | Interop layer with iTwin.js Core | | `@itwin/presentation-hierarchies` | `packages/hierarchies` | Hierarchy building from iModels and other sources | | `@itwin/presentation-hierarchies-react` | `packages/hierarchies-react` | React bindings for hierarchies | | `@itwin/presentation-components` | `packages/components` | React components (lists, property grids, tables) | | `@itwin/unified-selection` | `packages/unified-selection` | Unified selection storage | | `@itwin/unified-selection-react` | `packages/unified-selection-react` | React bindings for unified selection | | `@itwin/presentation-opentelemetry` | `packages/opentelemetry` | OpenTelemetry diagnostics integration | | `@itwin/presentation-tree-definitions` | `packages/tree-definitions` | Reusable UI-independent hierarchy definitions | | `@itwin/presentation-test-utilities` | `packages/test-utilities` | Internal test utilities | ## Apps | App | Path | Purpose | |-----|------|---------| | `full-stack-tests` | `apps/full-stack-tests` | Integration tests | | `test-app` | `apps/test-app` | Sample app (frontend + backend) | | `performance-tests` | `apps/performance-tests` | Benchmarks for hierarchies and unified selection | ## Key Conventions - For packages under `packages/`, a package is **private** when its `package.json` sets `"private": true`; otherwise it is **public**. A **production package** is any public package, plus any private package whose `package.json` declares a `license` field. Production packages require 100% test coverage; use `pnpm cover` to check it. - Packages produce ESM-only output via `tsconfig.lib.json` (built with `tsc`) or `tsdown` - Public API is tracked via `extract-api` and `.api.md` report files in `api/` folders - Copyright headers are required on all source files (enforced by `copyrightLinter.js`): ``` /*--------------------------------------------------------------------------------------------- * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *--------------------------------------------------------------------------------------------*/ ``` - User-visible changes to released packages require a changeset (`pnpm change`); packages with `"private": true` do not require a changeset. - Build order is managed by Lage (`lage build`, dependencies via `^build`) - Linting is split between two tools that are always run separately: - `lint` runs oxlint with the root `.oxlintrc.json` (default rules, type-aware, plus the `react` plugin for packages that depend on React). Editors use oxlint too. - `lint:no-internal` runs ESLint with only `@itwin/no-internal` and `@itwin/no-internal-barrel-imports`, which oxlint can't run. It is never run implicitly; run it explicitly or rely on CI. - Suppress oxlint findings with `// oxlint-disable-next-line <rule>`; use `// eslint-disable-next-line @itwin/<rule>` only for the `@itwin` rules. - When adding a package that depends on React, add it to the `react` override in `.oxlintrc.json`. ## Common Commands | Scope | Build | Test | Lint | `@itwin` ESLint rules | Format | |-------|-------|------|------|------|--------| | All (repo root) | `pnpm build:all` | `pnpm cover:all` | `pnpm lint:all` | `pnpm lint:no-internal:all` | `pnpm format` | | Single package | `pnpm build` | `pnpm test` | `pnpm lint` | `pnpm lint:no-internal` | `pnpm -w exec oxfmt --check .` | | Scoped build | `pnpm lage build --to <package>` | — | — | — | — | | Format fix | `pnpm format:fix` | — | — | — | — |
Voir sur GitHub