mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-21 21:30:47 +02:00
Convert types.d.mts from ambient module declaration to module augmentation which enables VS Code to handle @type {import("markdownlint").Rule}
(https://www.typescriptlang.org/docs/handbook/modules/reference.html#ambient-modules), fix broken markdownlint @typedefs in helpers/*.cjs.
This commit is contained in:
parent
6737ace933
commit
8b26129d55
3 changed files with 5 additions and 4 deletions
|
@ -10,11 +10,11 @@ module.exports.newLineRe = newLineRe;
|
|||
module.exports.nextLinesRe = nextLinesRe;
|
||||
|
||||
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/52529
|
||||
/** @typedef {import("markdownlint").RuleOnError} RuleOnError */
|
||||
/** @typedef {import("../lib/exports.mjs").RuleOnError} RuleOnError */
|
||||
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/52529
|
||||
/** @typedef {import("markdownlint").RuleOnErrorFixInfo} RuleOnErrorFixInfo */
|
||||
/** @typedef {import("../lib/exports.mjs").RuleOnErrorFixInfo} RuleOnErrorFixInfo */
|
||||
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/52529
|
||||
/** @typedef {import("markdownlint").MicromarkToken} MicromarkToken */
|
||||
/** @typedef {import("../lib/exports.mjs").MicromarkToken} MicromarkToken */
|
||||
// eslint-disable-next-line jsdoc/valid-types
|
||||
/** @typedef {import("micromark-extension-gfm-footnote", { with: { "resolution-mode": "import" } })} */
|
||||
// eslint-disable-next-line jsdoc/valid-types
|
||||
|
|
|
@ -7,7 +7,7 @@ const { flatTokensSymbol, htmlFlowSymbol } = require("./shared.cjs");
|
|||
// eslint-disable-next-line jsdoc/valid-types
|
||||
/** @typedef {import("micromark-util-types", { with: { "resolution-mode": "import" } }).TokenType} TokenType */
|
||||
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/52529
|
||||
/** @typedef {import("markdownlint").MicromarkToken} Token */
|
||||
/** @typedef {import("../lib/exports.mjs").MicromarkToken} Token */
|
||||
|
||||
/**
|
||||
* Determines if a Micromark token is within an htmlFlow type.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue