-
Notifications
You must be signed in to change notification settings - Fork 2
dx: extract hardcoded known-preset list in config.ts into a shared constant #67
Copy link
Copy link
Open
Labels
dxDeveloper experience improvementsDeveloper experience improvementsgood first issueGood for newcomersGood for newcomers
Description
In src/storage/config.ts, the parseConfig function contains a hardcoded array of known preset IDs used for validation warnings: ["essential-safety", "ai-agent-guardrails", "production-ready", "team-collaboration"]. This duplicates the preset IDs already defined in src/presets.ts via the PRESET_BUNDLES array. If a new preset is added to presets.ts, the config warning list will silently become stale. Extract the known preset IDs from PRESET_BUNDLES and use that as the single source of truth in both places.
Relevant files:
src/storage/config.ts— replace the hardcodedknownarray (line ~66) with a reference to the shared constantsrc/presets.ts— export aPRESET_IDSconstant (e.g.,PRESET_BUNDLES.map(b => b.id)) or exportPRESET_BUNDLES(already exported) and derive IDs in config.ts
Acceptance criteria:
- The hardcoded preset ID list in
config.tsis replaced with a derived list frompresets.ts npm run lintandnpm testpass- No change in runtime behavior (same warning message for unknown presets)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
dxDeveloper experience improvementsDeveloper experience improvementsgood first issueGood for newcomersGood for newcomers