Update test repos script to transform "header"-based rule names to "heading"-based now that the former aliases have been removed.

This commit is contained in:
David Anson 2023-11-10 22:56:25 -08:00
parent a9a77940c5
commit 4390715f4b

View file

@ -32,9 +32,14 @@ async function lintTestRepo(t, globPatterns, configPath) {
// @ts-ignore // @ts-ignore
readConfigPromise(configPath, [ jsoncParse, yamlParse ]) readConfigPromise(configPath, [ jsoncParse, yamlParse ])
]).then((globbyAndReadConfigResults) => { ]).then((globbyAndReadConfigResults) => {
const [ files, config ] = globbyAndReadConfigResults; const [ files, rawConfig ] = globbyAndReadConfigResults;
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
console.log(`${t.title}: Linting ${files.length} files...`); console.log(`${t.title}: Linting ${files.length} files...`);
const config = Object.fromEntries(
// @ts-ignore
Object.entries(rawConfig).
map(([ k, v ]) => [ k.replace(/header/, "heading"), v ])
);
return markdownlintPromise({ return markdownlintPromise({
files, files,
config config