Update test repos script to transform "allow_different_nesting" rule parameter to "siblings_only" per removal of former.

This commit is contained in:
David Anson 2023-12-05 20:09:57 -08:00
parent f2725178b1
commit 652244fbab
2 changed files with 10 additions and 1 deletions

View file

@ -38,7 +38,16 @@ async function lintTestRepo(t, globPatterns, configPath) {
const config = Object.fromEntries( const config = Object.fromEntries(
// @ts-ignore // @ts-ignore
Object.entries(rawConfig). Object.entries(rawConfig).
map(([ k, v ]) => [ k.replace(/header/, "heading"), v ]) map(([ k, v ]) => [
k.replace(/header/, "heading"),
typeof v === "object" ?
Object.fromEntries(
// @ts-ignore
Object.entries(v).
map(([ kk, vv ]) => [ kk.replace(/^allow_different_nesting$/, "siblings_only"), vv ])
) :
v
])
); );
return markdownlintPromise({ return markdownlintPromise({
files, files,