mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Update external repository test for conversion from .markdownlint.json to .markdownlint-cli2.jsonc.
This commit is contained in:
parent
9fcce62e20
commit
c845fe5ca3
1 changed files with 5 additions and 2 deletions
|
|
@ -26,7 +26,10 @@ async function lintTestRepo(t, globPatterns, configPath, ignoreRes) {
|
||||||
const { globby } = await import("globby");
|
const { globby } = await import("globby");
|
||||||
// eslint-disable-next-line node/no-unsupported-features/es-syntax
|
// eslint-disable-next-line node/no-unsupported-features/es-syntax
|
||||||
const { "default": stripJsonComments } = await import("strip-json-comments");
|
const { "default": stripJsonComments } = await import("strip-json-comments");
|
||||||
const jsoncParse = (json) => JSON.parse(stripJsonComments(json));
|
const jsoncParse = (json) => {
|
||||||
|
const config = JSON.parse(stripJsonComments(json));
|
||||||
|
return config.config || config;
|
||||||
|
};
|
||||||
const yamlParse = (yaml) => jsYaml.load(yaml);
|
const yamlParse = (yaml) => jsYaml.load(yaml);
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
globby(globPatterns),
|
globby(globPatterns),
|
||||||
|
|
@ -226,7 +229,7 @@ if (existsSync(dotnetDocsDir)) {
|
||||||
test("https://github.com/dotnet/docs", (t) => {
|
test("https://github.com/dotnet/docs", (t) => {
|
||||||
const rootDir = dotnetDocsDir;
|
const rootDir = dotnetDocsDir;
|
||||||
const globPatterns = [ join(rootDir, "**/*.md") ];
|
const globPatterns = [ join(rootDir, "**/*.md") ];
|
||||||
const configPath = join(rootDir, ".markdownlint.json");
|
const configPath = join(rootDir, ".markdownlint-cli2.jsonc");
|
||||||
return lintTestRepo(t, globPatterns, configPath);
|
return lintTestRepo(t, globPatterns, configPath);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue