packages/*: TypeScript libraries and CLIs withsrc/,tsconfig.json, andturbo.jsonc; builds emit todist/.platform/*: shared tooling packages (config-typescript) used across the workspace..patricktree-stack/: git submodule with the shared baseline (oxfmt/oxlint/turbo configs, GitHub Actions) used by all patricktree monorepos. Do not edit it from here; change it in its own repository.- Root files:
turbo.jsonccoordinates build/lint/test;pnpm-workspace.yamldefines the workspace scope and the dependency catalogs;package.json#devEngines.runtimepins the Node.js version.
pnpm install: bootstrap with workspacepnpm(package.json#packageManager); Node.js comes fromdevEngines.runtime.pnpm build: runturbo run turbo:buildacross packages.pnpm lint/pnpm lint:fix: lint with oxlint after builds perturbo.jsoncdependencies; auto-fix withlint:fix.pnpm format/pnpm format:check: apply/check oxfmt across the workspace.pnpm fix:formatfollowed bylint:fix.pnpm declutter: run knip to find unused files, exports and dependencies.pnpm validate: build, lint, test anddeclutterin one go.pnpm --filter <pkg> run build:watch: package-level watch/compile loop.pnpm clean: remove build artifacts, turbo caches andnode_modules.- Validation when you think you are finished:
pnpm install && pnpm run fix && pnpm run validate && pnpm run format:check.
- TypeScript-first; follow the shared configs from
@patricktree-stack/config-oxlint,@patricktree-stack/config-oxfmtand@patricktree/config-typescript. - Format with oxfmt; lint with oxlint (
--type-aware). typescriptresolves to@typescript/typescript6and@typescript/nativeto TypeScript 7, both via the pnpm catalog inpnpm-workspace.yaml. Add them ascatalog:entries, never as literal versions.- Prefer
camelCasefor functions/variables,PascalCasefor types/classes, and lower-case descriptive filenames undersrc/. - Only disable oxlint rules when there is truly no other viable option; prefer code or config fixes instead, and always state the reason in a comment.
- Respect each package's module target (CommonJS vs ESM) and keep exports aligned with existing
package.jsonfields.
- Use Vitest where present; co-locate specs alongside source with clear, discoverable names.
- Create "package consumption scenarios" tests like
packages/typescript-eslint-rules-requiring-type-info/test-pkg-consumption-scenarios. - Before PRs, run targeted tests via
pnpm --filter <pkg> test.
- Follow Conventional Commits as seen in history (
chore:,fix(scope):,ci:,refactor:); include scope when useful. - Add a Changeset (
pnpm changeset) for user-facing package changes; omit for tooling-only tweaks unless publishing impact. - PRs should describe intent, affected packages, and commands run (
build,lint, relevant tests); link issues and include screenshots/logs for UX/CLI changes when helpful.