mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 22:10:13 +01:00
Update/simplify test-repos scripts.
This commit is contained in:
parent
ebded850b5
commit
81dacdae0d
2 changed files with 2 additions and 8 deletions
|
|
@ -9,6 +9,6 @@ const { lintTestRepo } = require("./markdownlint-test-repos");
|
||||||
test("https://github.com/mdn/content", (t) => {
|
test("https://github.com/mdn/content", (t) => {
|
||||||
const rootDir = "./test-repos/mdn-content";
|
const rootDir = "./test-repos/mdn-content";
|
||||||
const globPatterns = [ join(rootDir, "**/*.md") ];
|
const globPatterns = [ join(rootDir, "**/*.md") ];
|
||||||
const configPath = join(rootDir, ".markdownlint.jsonc");
|
const configPath = join(rootDir, ".markdownlint-cli2.jsonc");
|
||||||
return lintTestRepo(t, globPatterns, configPath);
|
return lintTestRepo(t, globPatterns, configPath);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -34,13 +34,7 @@ async function lintTestRepo(t, globPatterns, configPath) {
|
||||||
Object.entries(rawConfig).
|
Object.entries(rawConfig).
|
||||||
map(([ k, v ]) => [
|
map(([ k, v ]) => [
|
||||||
k.replace(/header/, "heading"),
|
k.replace(/header/, "heading"),
|
||||||
typeof v === "object" ?
|
v
|
||||||
Object.fromEntries(
|
|
||||||
// @ts-ignore
|
|
||||||
Object.entries(v).
|
|
||||||
map(([ kk, vv ]) => [ kk.replace(/^allow_different_nesting$/, "siblings_only"), vv ])
|
|
||||||
) :
|
|
||||||
v
|
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
return markdownlint.promises.markdownlint({
|
return markdownlint.promises.markdownlint({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue