feat: auto-detect default config file#913
Conversation
Signed-off-by: 112-stack <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview README Reviewed by Cursor Bugbot for commit 265cc22. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
Please look at the feedback given on #901 before sending an AI agent to rush in and complete the work incorrectly |
|
Thanks for pointing this out, You're right, I should have reviewed #901 and its discussion before opening this PR. #913 duplicates that active work and only handles I'm closing this PR rather than competing with the existing contributor's work. Sorry for the noise. |
Description
Automatically discover
doc-kit.config.mjsin the current working directory when--config-fileis omitted. An explicitly supplied config path still takes precedence.The previous loader returned an empty configuration whenever the CLI option was absent, so the conventional filename could not be used without repeating the flag. This change adds dependency-free discovery, focused coverage for discovery/absence/explicit precedence, user-facing documentation, and a minor changeset.
Validation
node --test --experimental-test-module-mocks src/utils/configuration/__tests__/index.test.mjs— 16/16 passnode --run lint— 0 errors (2 existing warnings inuseOrama.mjs)node --run format:check— passsrc/generators/ast/__tests__/generate.test.mjsandsrc/generators/web/utils/__tests__/copying.test.mjs; none touch configuration loading.Related Issues
Fixes #897
Check List
node --run testand all tests passed. (See the Windows-only baseline failures documented above.)node --run format&node --run lint.