2022-06-07 22:51:12 -07:00
|
|
|
import { readFile } from "node:fs/promises";
|
2024-12-03 19:58:28 -08:00
|
|
|
import { lint } from "markdownlint/promise";
|
2022-06-07 22:51:12 -07:00
|
|
|
|
|
|
|
const strings = {
|
2023-01-05 22:24:04 -05:00
|
|
|
"CHANGELOG": await readFile("CHANGELOG.md", "utf8"),
|
2022-06-07 22:51:12 -07:00
|
|
|
"CONTRIBUTING": await readFile("CONTRIBUTING.md", "utf8"),
|
|
|
|
"README": await readFile("README.md", "utf8"),
|
|
|
|
"CustomRules": await readFile("./doc/CustomRules.md", "utf8"),
|
|
|
|
"Prettier": await readFile("./doc/Prettier.md", "utf8"),
|
|
|
|
"Rules": await readFile("./doc/Rules.md", "utf8")
|
|
|
|
};
|
|
|
|
|
|
|
|
const start = new Date();
|
|
|
|
for (let i = 0; i < 250; i++) {
|
2022-10-26 03:26:59 +00:00
|
|
|
// eslint-disable-next-line no-await-in-loop
|
2024-12-03 19:58:28 -08:00
|
|
|
await lint({ strings });
|
2022-06-07 22:51:12 -07:00
|
|
|
}
|
|
|
|
const end = new Date();
|
2022-10-26 03:26:59 +00:00
|
|
|
// eslint-disable-next-line no-console
|
2022-06-07 22:51:12 -07:00
|
|
|
console.log(`Elapsed: ${end - start}`);
|