feat(cli): YAML config support + published JSON Schema#34
Merged
Conversation
Add docker-doctor.config.yaml/.yml to config resolution (after .json,
also via --config) using the yaml dependency the Compose parser already
ships. The website now serves /schema.json — generated from allRules at
build time — so YAML ("# yaml-language-server: $schema=…") and JSON
("$schema" key) configs get editor autocomplete and validation.
Also drop the config test suite's expectPartialCategories workaround,
dead since DockerDoctorConfig.categories became Partial.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The bundled skill's config-format lists were stale after YAML support. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Infra users live in YAML (they're writing Compose files anyway) — docker-doctor's config now meets them there.
YAML config files
docker-doctor.config.yaml/.ymljoin the resolution order (appended after.json, so existing projects resolve identically) and work with--config <path>too. Parsing reuses theyamldependency the Compose parser already ships — zero new dependencies. Unlike.ts/.jsconfigs, YAML/JSON need no"type": "module"in package.json.Published JSON Schema
The website serves
/schema.json, generated fromallRulesat build time (Next.jsforce-staticroute handler) — every rule key autocompletes with its description, categories and severities are enums, and it can never drift from the rule set. Editors pick it up via:or a
"$schema"key in JSON configs (the validator already strips unknown top-level keys, so$schemais safe at runtime).Cleanup folded in
apps/webnow depends on@docker-doctor/core(workspace) for the schema route; web tsconfig target bumped ES2017 → ES2022 to typecheck core's named-capture-group regexes.expectPartialCategoriescast workaround — dead sincecategoriesbecamePartial<Record<…>>in feat(cli): export DockerDoctorConfig type and defineConfig helper #33.Testing
.yaml/.ymlload,.json-over-.yamlprecedence, malformed YAML →ConfigError, invalid severity in YAML →ConfigError,--config custom.yaml. Suite: 88 core + 15 CLI pass; typecheck + ultracite clean./schema.json; verified the emitted body contains all five categories and generated rule keys..yamlconfig through the built CLI dropspin-image-version(rule off) andprefer-slim(Image Size off) whileno-root-userstill fires.Changeset: patch bump for
@docker-doctor/cli.🤖 Generated with Claude Code