From d39bbd01a8f36e488031877274af8c3a5201c06d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Smoli=C5=84ski?= Date: Thu, 22 Oct 2026 17:08:15 +0200 Subject: [PATCH] docsConsistency: lint fixes Co-Authored-By: Claude Opus 5.5 --- test/docsConsistency.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/docsConsistency.test.ts b/test/docsConsistency.test.ts index 1520267..b7d999f 100644 --- a/test/docsConsistency.test.ts +++ b/test/docsConsistency.test.ts @@ -136,15 +136,15 @@ describe('docs ↔ code', () => { test('every module page is listed in docs/README.md', () => { const index = read('docs/README.md') - const pages = readdirSync(path.join(root, 'docs')).filter((n) => n.endsWith('.md') && !['README.md', 'CHANGELOG.md'].includes(n)) + const pages = readdirSync(path.join(root, 'docs')).filter((n) => n.endsWith('.md') && !['CHANGELOG.md', 'README.md'].includes(n)) expect(pages.filter((p) => !index.includes(`(./${p})`))).toEqual([]) }) test('AGENT.md § references point at existing sections', () => { - const headings = new Set([...read('docs/agent/AGENT.md').matchAll(/^#{2,3} ([0-9]+[a-z]?(?:\.[0-9]+[a-z]?)*)\.? /gm)].map((m) => m[1])) + const headings = new Set([...read('docs/agent/AGENT.md').matchAll(/^#{2,3} (\d+[a-z]?(?:\.\d+[a-z]?)*)\.? /gm)].map((m) => m[1])) const missing: string[] = [] for (const file of docs) { - for (const m of read(file).matchAll(/AGENT\.md ?§ ?([0-9]+[a-z]?(?:\.[0-9]+[a-z]?)*)/g)) { + for (const m of read(file).matchAll(/AGENT\.md ?§ ?(\d+[a-z]?(?:\.\d+[a-z]?)*)/g)) { const id = m[1] // §0b.4 may point at a numbered rule inside §0b — the parent section is enough. if (!headings.has(id) && !headings.has(id.replace(/\.[^.]+$/, ''))) {missing.push(`${file}: §${id}`)}