mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 22:10:13 +01:00
Remove outdated table-column-style suppression from mdn/content test repo, address new VS Code type warnings.
Some checks are pending
Checkers / linkcheck (push) Waiting to run
Checkers / spellcheck (push) Waiting to run
CI / build (20, macos-latest) (push) Waiting to run
CI / build (20, ubuntu-latest) (push) Waiting to run
CI / build (20, windows-latest) (push) Waiting to run
CI / build (22, macos-latest) (push) Waiting to run
CI / build (22, ubuntu-latest) (push) Waiting to run
CI / build (22, windows-latest) (push) Waiting to run
CI / build (24, macos-latest) (push) Waiting to run
CI / build (24, ubuntu-latest) (push) Waiting to run
CI / build (24, windows-latest) (push) Waiting to run
CI / pnpm (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
TestRepos / build (latest, ubuntu-latest) (push) Waiting to run
UpdateTestRepos / update (push) Waiting to run
Some checks are pending
Checkers / linkcheck (push) Waiting to run
Checkers / spellcheck (push) Waiting to run
CI / build (20, macos-latest) (push) Waiting to run
CI / build (20, ubuntu-latest) (push) Waiting to run
CI / build (20, windows-latest) (push) Waiting to run
CI / build (22, macos-latest) (push) Waiting to run
CI / build (22, ubuntu-latest) (push) Waiting to run
CI / build (22, windows-latest) (push) Waiting to run
CI / build (24, macos-latest) (push) Waiting to run
CI / build (24, ubuntu-latest) (push) Waiting to run
CI / build (24, windows-latest) (push) Waiting to run
CI / pnpm (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
TestRepos / build (latest, ubuntu-latest) (push) Waiting to run
UpdateTestRepos / update (push) Waiting to run
This commit is contained in:
parent
6a6fa32a7e
commit
4b948627aa
2 changed files with 5 additions and 5 deletions
|
|
@ -9,5 +9,5 @@ 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-cli2.jsonc");
|
const configPath = join(rootDir, ".markdownlint-cli2.jsonc");
|
||||||
return lintTestRepo(t, globPatterns, configPath, { "table-column-style": false }, true);
|
return lintTestRepo(t, globPatterns, configPath, undefined, true);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -14,20 +14,20 @@ import { markdownlintParallel } from "./markdownlint-test-parallel.mjs";
|
||||||
/**
|
/**
|
||||||
* Lints a test repository.
|
* Lints a test repository.
|
||||||
*
|
*
|
||||||
* @param {Object} t Test instance.
|
* @param {import("ava").ExecutionContext<unknown>} t Test instance.
|
||||||
* @param {string[]} globPatterns Array of files to in/exclude.
|
* @param {string[]} globPatterns Array of files to in/exclude.
|
||||||
* @param {string} configPath Path to config file.
|
* @param {string} configPath Path to config file.
|
||||||
* @param {Configuration} [configOverrides] Configuration overrides.
|
* @param {Configuration} [configOverrides] Configuration overrides.
|
||||||
* @param {boolean} [parallel] True to lint in parallel.
|
* @param {boolean} [parallel] True to lint in parallel.
|
||||||
* @returns {Promise} Test result.
|
* @returns {Promise<void>} Test result.
|
||||||
*/
|
*/
|
||||||
export function lintTestRepo(t, globPatterns, configPath, configOverrides, parallel) {
|
export function lintTestRepo(t, globPatterns, configPath, configOverrides, parallel) {
|
||||||
t.plan(1);
|
t.plan(1);
|
||||||
const jsoncParse = (json) => {
|
const jsoncParse = (/** @type {string} */ json) => {
|
||||||
const config = jsoncParser.parse(json, [], { "allowTrailingComma": true });
|
const config = jsoncParser.parse(json, [], { "allowTrailingComma": true });
|
||||||
return config.config || config;
|
return config.config || config;
|
||||||
};
|
};
|
||||||
const yamlParse = (yaml) => jsYaml.load(yaml);
|
const yamlParse = (/** @type {string} */ yaml) => jsYaml.load(yaml);
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
globby(globPatterns),
|
globby(globPatterns),
|
||||||
readConfig(configPath, [ jsoncParse, yamlParse ])
|
readConfig(configPath, [ jsoncParse, yamlParse ])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue