mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-02-12 00:24:21 +01:00
Some checks failed
Checkers / linkcheck (push) Has been cancelled
Checkers / spellcheck (push) Has been cancelled
CI / build (20, macos-latest) (push) Has been cancelled
CI / build (20, ubuntu-latest) (push) Has been cancelled
CI / build (20, windows-latest) (push) Has been cancelled
CI / build (22, macos-latest) (push) Has been cancelled
CI / build (22, ubuntu-latest) (push) Has been cancelled
CI / build (22, windows-latest) (push) Has been cancelled
CI / build (24, macos-latest) (push) Has been cancelled
CI / build (24, ubuntu-latest) (push) Has been cancelled
CI / build (24, windows-latest) (push) Has been cancelled
CI / pnpm (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
TestRepos / build (latest, ubuntu-latest) (push) Has been cancelled
UpdateTestRepos / update (push) Has been cancelled
82 lines
2.7 KiB
JavaScript
82 lines
2.7 KiB
JavaScript
// @ts-check
|
|
|
|
import path from "node:path";
|
|
const { join } = path.posix;
|
|
import test from "ava";
|
|
import { excludeGlobs, lintTestRepo } from "./markdownlint-test-repos.mjs";
|
|
|
|
// Run markdownlint the same way the corresponding repositories do
|
|
|
|
test("https://github.com/apache/airflow", (t) => {
|
|
const rootDir = "./test-repos/apache-airflow";
|
|
const globPatterns = [ join(rootDir, "**/*.{md,mdown,markdown}") ];
|
|
const configPath = join(rootDir, ".markdownlint.yml");
|
|
return lintTestRepo(t, globPatterns, configPath);
|
|
});
|
|
|
|
test("https://github.com/electron/electron", (t) => {
|
|
const rootDir = "./test-repos/electron-electron";
|
|
const globPatterns = [
|
|
join(rootDir, "*.md"),
|
|
join(rootDir, "docs/**/*.md")
|
|
];
|
|
const configPath = join(rootDir, ".markdownlint-cli2.jsonc");
|
|
return lintTestRepo(t, globPatterns, configPath);
|
|
});
|
|
|
|
test("https://github.com/eslint/eslint", (t) => {
|
|
const rootDir = "./test-repos/eslint-eslint";
|
|
const globPatterns = [ join(rootDir, "docs/**/*.md") ];
|
|
const configPath = join(rootDir, ".markdownlint.yml");
|
|
return lintTestRepo(t, globPatterns, configPath);
|
|
});
|
|
|
|
test("https://github.com/mkdocs/mkdocs", (t) => {
|
|
const rootDir = "./test-repos/mkdocs-mkdocs";
|
|
const globPatterns = [
|
|
join(rootDir, "README.md"),
|
|
join(rootDir, "CONTRIBUTING.md"),
|
|
join(rootDir, "docs"),
|
|
...excludeGlobs(
|
|
rootDir,
|
|
"docs/CNAME",
|
|
"docs/**/*.css",
|
|
"docs/**/*.png",
|
|
"docs/**/*.py",
|
|
"docs/**/*.svg"
|
|
)
|
|
];
|
|
const configPath = join(rootDir, ".markdownlint.yaml");
|
|
return lintTestRepo(t, globPatterns, configPath);
|
|
});
|
|
|
|
test("https://github.com/pi-hole/docs", (t) => {
|
|
const rootDir = "./test-repos/pi-hole-docs";
|
|
const globPatterns = [ join(rootDir, "**/*.md") ];
|
|
const configPath = join(rootDir, ".markdownlint.json");
|
|
return lintTestRepo(t, globPatterns, configPath);
|
|
});
|
|
|
|
test("https://github.com/v8/v8.dev", (t) => {
|
|
const rootDir = "./test-repos/v8-v8-dev";
|
|
const globPatterns = [ join(rootDir, "src/**/*.md") ];
|
|
const configPath = join(rootDir, ".markdownlint.json");
|
|
return lintTestRepo(t, globPatterns, configPath);
|
|
});
|
|
|
|
test("https://github.com/webhintio/hint", (t) => {
|
|
const rootDir = "./test-repos/webhintio-hint";
|
|
const globPatterns = [
|
|
join(rootDir, "**/*.md"),
|
|
...excludeGlobs(rootDir, "**/CHANGELOG.md")
|
|
];
|
|
const configPath = join(rootDir, ".markdownlintrc");
|
|
return lintTestRepo(t, globPatterns, configPath);
|
|
});
|
|
|
|
test("https://github.com/webpack/webpack.js.org", (t) => {
|
|
const rootDir = "./test-repos/webpack-webpack-js-org";
|
|
const globPatterns = [ join(rootDir, "**/*.md") ];
|
|
const configPath = join(rootDir, ".markdownlint.json");
|
|
return lintTestRepo(t, globPatterns, configPath);
|
|
});
|