mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-25 17:14:57 +02:00
* Fix markdown lint scope and add regression test * Exclude non-product markdown trees from lint scope
24 lines
1.0 KiB
JavaScript
24 lines
1.0 KiB
JavaScript
import { describe, it } from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import { readFileSync } from 'node:fs';
|
|
import { dirname, resolve } from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
const packageJson = JSON.parse(readFileSync(resolve(__dirname, '../package.json'), 'utf-8'));
|
|
const lintMdScript = packageJson.scripts?.['lint:md'] ?? '';
|
|
|
|
describe('markdown lint script scope', () => {
|
|
it('excludes non-product markdown trees from lint target', () => {
|
|
assert.match(lintMdScript, /markdownlint-cli2/);
|
|
assert.match(lintMdScript, /'!\.agent\/\*\*'/);
|
|
assert.match(lintMdScript, /'!\.agents\/\*\*'/);
|
|
assert.match(lintMdScript, /'!\.claude\/\*\*'/);
|
|
assert.match(lintMdScript, /'!\.factory\/\*\*'/);
|
|
assert.match(lintMdScript, /'!\.windsurf\/\*\*'/);
|
|
assert.match(lintMdScript, /'!skills\/\*\*'/);
|
|
assert.match(lintMdScript, /'!docs\/internal\/\*\*'/);
|
|
assert.match(lintMdScript, /'!docs\/Docs_To_Review\/\*\*'/);
|
|
});
|
|
});
|