This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a Bun/TypeScript monorepo (workspaces) containing tools for validating Web Components usage against Custom Elements Manifest (CEM) files. Uses wireit for incremental build caching.
projects/cli/(@webq/cli) — Bun/TypeScript CLI tool and MCP server for querying and validating CEM JSON files. Includes 18 HTML validation rules. Seeprojects/cli/CLAUDE.mdfor details.projects/eslint/(@webq/eslint) — ESLint plugin that validates custom element HTML usage via@html-eslint/parser. Delegates validation to thewebqCLI. Seeprojects/eslint/CLAUDE.mdfor details.projects/schemas/— JSON schemas for custom-elements, custom-attributes, custom-patterns, custom-styles, DTCG tokens, and VSCode custom data formats.
- This repo uses Bun as the package manager and runtime. Always use
bun run <script>,bun test,bun install, andbun x <package>— nevernpm,npx, oryarn. - Dependencies must always be pinned to an exact version number (no
^or~prefixes).
bun install # Install all dependencies
bun run ci # Build + test all packages (wireit, cached)
bun run format # Check formatting (prettier)
bun run format:fix # Fix formattingcd projects/cli
bun run ci # Lint + test + build
bun test # Run tests
bun run build # Build for all platforms
bun src/index.ts # Run CLI directly
bun test src/internal/elements/store.test.ts # Single testcd projects/eslint
bun run ci # Build + lint + test (wireit, cached)
bun run build # TypeScript compilation
bun test src/ # Run all tests
bun test src/rules/no-unknown-attr.test.ts # Single testBoth packages consume CEM JSON (custom-elements.json) files — the standard format for documenting Web Components. The ESLint plugin delegates validation to the webq CLI at lint time; the CLI provides runtime querying and HTML validation via CLI or MCP protocol. Both packages implement the same 18 validation rules.