Implement the 031-quality-gates-hygiene feature that strengthens automated quality gates by adding pnpm audit to the check script, v8 coverage thresholds with per-directory auto-ratchet (domain 96%, adapters 71%, persistence 87%), Biome cognitive complexity enforcement (max 15), and keyboard accessibility for the combatant row, while cleaning up all blanket biome-ignore comments, refactoring 5 overly complex functions into smaller helpers, and codifying the early-enforcement principle in the constitution and CLAUDE.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -254,25 +254,36 @@ function formatConditionImmunities(
|
||||
.join(", ");
|
||||
}
|
||||
|
||||
function renderListItem(item: string | RawEntryObject): string | undefined {
|
||||
if (typeof item === "string") {
|
||||
return `• ${stripTags(item)}`;
|
||||
}
|
||||
if (item.name && item.entries) {
|
||||
return `• ${stripTags(item.name)}: ${renderEntries(item.entries)}`;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function renderEntryObject(entry: RawEntryObject, parts: string[]): void {
|
||||
if (entry.type === "list") {
|
||||
for (const item of entry.items ?? []) {
|
||||
const rendered = renderListItem(item);
|
||||
if (rendered) parts.push(rendered);
|
||||
}
|
||||
} else if (entry.type === "item" && entry.name && entry.entries) {
|
||||
parts.push(`${stripTags(entry.name)}: ${renderEntries(entry.entries)}`);
|
||||
} else if (entry.entries) {
|
||||
parts.push(renderEntries(entry.entries));
|
||||
}
|
||||
}
|
||||
|
||||
function renderEntries(entries: (string | RawEntryObject)[]): string {
|
||||
const parts: string[] = [];
|
||||
for (const entry of entries) {
|
||||
if (typeof entry === "string") {
|
||||
parts.push(stripTags(entry));
|
||||
} else if (entry.type === "list") {
|
||||
for (const item of entry.items ?? []) {
|
||||
if (typeof item === "string") {
|
||||
parts.push(`• ${stripTags(item)}`);
|
||||
} else if (item.name && item.entries) {
|
||||
parts.push(
|
||||
`• ${stripTags(item.name)}: ${renderEntries(item.entries)}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
} else if (entry.type === "item" && entry.name && entry.entries) {
|
||||
parts.push(`${stripTags(entry.name)}: ${renderEntries(entry.entries)}`);
|
||||
} else if (entry.entries) {
|
||||
parts.push(renderEntries(entry.entries));
|
||||
} else {
|
||||
renderEntryObject(entry, parts);
|
||||
}
|
||||
}
|
||||
return parts.join(" ");
|
||||
|
||||
Reference in New Issue
Block a user