Lint
Run linting and type checking.
Usage
/lint - Run all linters
/lint types - TypeScript type checking only
/lint --fix - Auto-fix fixable issues
/lint --strict - Strict mode (fail on warnings)
Type Checking
# Full type check
bun run typecheck
# Or directly with tsc
bunx tsc --noEmit
TypeScript Configuration
The project uses strict TypeScript settings:
| Setting | Value | Description |
|---|---|---|
strict |
true | Enable all strict checks |
noEmit |
true | Type check only, no output |
target |
ESNext | Latest JavaScript features |
module |
ESNext | ESM modules |
Common Type Issues
Native API Types
// Ensure Bun types are available
/// <reference types="bun-types" />
// Use Bun native APIs with proper types
const file = Bun.file('config.toml'); // BunFile
const server = Bun.serve({ ... }); // Server
URLPattern Types
// URLPattern is globally available in Bun
const pattern = new URLPattern({ pathname: '/api/:id' });
const result: URLPatternResult | null = pattern.exec(url);
Examples
# Check all TypeScript files
bunx tsc --noEmit
# Check specific package
bunx tsc --noEmit -p packages/core/tsconfig.json
# Watch mode for development
bunx tsc --noEmit --watch
Integration with Tests
Run type checking before tests:
# Type check then test
bunx tsc --noEmit && bun test
Related Skills
/test- Run test suites/build- Build packages
Converted and distributed by TomeVault — claim your Tome and manage your conversions.