|
| 1 | +# AGENTS.md |
| 2 | + |
| 3 | +This file provides guidance to agents when working with code in this repository. |
| 4 | + |
| 5 | +## Repository Overview |
| 6 | + |
| 7 | +A monorepo for unified JavaScript/TypeScript toolchain configurations at VirtualLiveLab. Provides ESLint, Prettier, Stylelint, and TSConfig packages. |
| 8 | + |
| 9 | +## Development Commands |
| 10 | + |
| 11 | +```bash |
| 12 | +# Build |
| 13 | +pnpm run build # Build all packages |
| 14 | +pnpm run build:eslint # Build eslint-config only |
| 15 | +pnpm run build:prettier # Build prettier-config only |
| 16 | +pnpm run build:stylelint # Build stylelint-config only |
| 17 | + |
| 18 | +# Test |
| 19 | +pnpm run test # Run all tests (Vitest) |
| 20 | + |
| 21 | +# Lint & Format |
| 22 | +pnpm run lint # Run ESLint |
| 23 | +pnpm run format # Format code with Prettier |
| 24 | + |
| 25 | +# Release Flow |
| 26 | +pnpm run changeset # Create changeset for version bump |
| 27 | +pnpm run release # Build → Test → Publish (requires changeset) |
| 28 | +``` |
| 29 | + |
| 30 | +## Repository Structure |
| 31 | + |
| 32 | +``` |
| 33 | +packages/ |
| 34 | + ├── eslint-config/ # ESLint configuration |
| 35 | + ├── prettier-config/ # Prettier configuration |
| 36 | + ├── stylelint-config/ # Stylelint configuration |
| 37 | + └── tsconfig/ # TypeScript configuration presets |
| 38 | +``` |
| 39 | + |
| 40 | +- **Monorepo**: pnpm workspace |
| 41 | +- **Versioning**: Automatically managed with changesets |
| 42 | +- **Build tool**: tsdown (for each package) |
| 43 | +- **Test**: Vitest (snapshot tests) |
| 44 | + |
| 45 | +## Development Flow |
| 46 | + |
| 47 | +1. Fork and create a branch |
| 48 | +2. Make code changes |
| 49 | +3. Run `pnpm run build` to confirm no build errors |
| 50 | +4. Run `pnpm run changeset` to record changes |
| 51 | + - Select the changed package(s) |
| 52 | + - Choose version type (patch/minor/major) |
| 53 | + - Describe the changes |
| 54 | +5. Create a PR |
| 55 | +6. After merge, GitHub Actions will automatically release |
| 56 | + |
| 57 | +## Technical Constraints |
| 58 | + |
| 59 | +- **Node.js**: >= 20 < 23 |
| 60 | +- **Package Manager**: pnpm required (v10.18.0) |
| 61 | +- **Tool Management**: mise (run `mise setup` to set up environment) |
| 62 | +- **Commit Style**: Conventional Commits recommended |
| 63 | + |
| 64 | +## Testing |
| 65 | + |
| 66 | +Each package uses snapshot tests. When changing configurations, run `pnpm run test` to verify snapshots are updated correctly. |
0 commit comments