Instruction file imported from tyler555g/best-practices (
.github/instructions/code.instructions.md). Copyright stays with the author.
Code Instructions
npm Package Conventions
- Node.js >= 22 required (specified in
engines.node) - Use
npm ciin CI environments - Use
npm testfor running tests publishConfig.access = "public"on all packages
Test Runner
- Node.js built-in test runner (
node --test) - Test files:
tests/**/*.test.jsandtests/*.test.js - Run with:
npm test
Monorepo Structure
- Root package:
@tyler.given/best-practices - Content package:
@tyler.given/best-practices-content(inpackages/content/) - Config package: In
packages/config/ - Workspaces configured in root
package.json
Git and Releases
- Conventional commits enforced by commitlint
- Use
feat:,fix:,docs:,chore:, etc. - Feature branches + draft PRs only
- Release with:
npm run release(changeset-based) - Use:
npx changesetto create changesets
Security
- No secrets in code — use environment variables and secrets managers
- Never commit API keys, passwords, or credentials
- Use proper error handling to avoid information leakage
Scripts Available
npm test— run tests with Node.js test runnernpx changeset— create version bump changesetsnpm run release— publish to npm with public accessnpm run audit:deps— security audit dependencies