Update to use named exports via / /async /promise /sync, simplify references via self-referencing, refine examples.

This commit is contained in:
David Anson 2024-12-03 19:58:28 -08:00
parent e41f034bef
commit 8da43dd246
96 changed files with 635 additions and 548 deletions

View file

@ -10,7 +10,7 @@ let params = undefined;
/**
* Initializes (resets) the cache.
*
* @param {import("./markdownlint.mjs").RuleParams} [p] Rule parameters object.
* @param {import("markdownlint").RuleParams} [p] Rule parameters object.
* @returns {void}
*/
export function initialize(p) {
@ -37,9 +37,9 @@ function getCached(name, getValue) {
/**
* Filters a list of Micromark tokens by type and caches the result.
*
* @param {import("./markdownlint.mjs").MicromarkTokenType[]} types Types to allow.
* @param {import("markdownlint").MicromarkTokenType[]} types Types to allow.
* @param {boolean} [htmlFlow] Whether to include htmlFlow content.
* @returns {import("./markdownlint.mjs").MicromarkToken[]} Filtered tokens.
* @returns {import("markdownlint").MicromarkToken[]} Filtered tokens.
*/
export function filterByTypesCached(types, htmlFlow) {
return getCached(