Step 2 (part 1) of the build order in `docs/spec.md`: `src/config.ts` with tests, written test-first.
- `resolveConfig(options, env)`: option > env > default for `baseURL` (`CRW_API_URL`, default `http://localhost:3000`) and `apiKey` (`CRW_API_KEY`); `limit` default 8 clamped to 1..20; `lang`; `tbs` enum
- Blank strings count as unset; trailing slashes are stripped
- Bad `baseURL`/`tbs` or non-string `lang`/`apiKey` throw naming the option; `apiKey` errors never echo the value; `limit` never throws
- 11 tests (`node --test`); `npm run check` passes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Step 2 (part 1) of the build order in
docs/spec.md:src/config.tswith tests, written test-first.resolveConfig(options, env): option > env > default forbaseURL(CRW_API_URL, defaulthttp://localhost:3000) andapiKey(CRW_API_KEY);limitdefault 8 clamped to 1..20;lang;tbsenumbaseURL/tbsor non-stringlang/apiKeythrow naming the option;apiKeyerrors never echo the value;limitnever throwsnode --test);npm run checkpasses🤖 Generated with Claude Code