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

This commit is contained in:
David Anson 2025-11-15 21:18:18 -08:00
parent 6a6fa32a7e
commit 4b948627aa
2 changed files with 5 additions and 5 deletions

View file

@ -9,5 +9,5 @@ test("https://github.com/mdn/content", (t) => {
const rootDir = "./test-repos/mdn-content";
const globPatterns = [ join(rootDir, "**/*.md") ];
const configPath = join(rootDir, ".markdownlint-cli2.jsonc");
return lintTestRepo(t, globPatterns, configPath, { "table-column-style": false }, true);
return lintTestRepo(t, globPatterns, configPath, undefined, true);
});

View file

@ -14,20 +14,20 @@ import { markdownlintParallel } from "./markdownlint-test-parallel.mjs";
/**
* 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} configPath Path to config file.
* @param {Configuration} [configOverrides] Configuration overrides.
* @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) {
t.plan(1);
const jsoncParse = (json) => {
const jsoncParse = (/** @type {string} */ json) => {
const config = jsoncParser.parse(json, [], { "allowTrailingComma": true });
return config.config || config;
};
const yamlParse = (yaml) => jsYaml.load(yaml);
const yamlParse = (/** @type {string} */ yaml) => jsYaml.load(yaml);
return Promise.all([
globby(globPatterns),
readConfig(configPath, [ jsoncParse, yamlParse ])