mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Remove outdated type annotations and lint suppressions.
This commit is contained in:
parent
d9c5d24e20
commit
1513e3803b
25 changed files with 208 additions and 322 deletions
17
lib/md045.js
17
lib/md045.js
|
|
@ -15,14 +15,13 @@ module.exports = {
|
|||
"tags": [ "accessibility", "images" ],
|
||||
"parser": "micromark",
|
||||
"function": function MD045(params, onError) {
|
||||
// eslint-disable-next-line jsdoc/valid-types
|
||||
/** @type import("../helpers/micromark.cjs").Token[] */
|
||||
const micromarkTokens =
|
||||
// @ts-ignore
|
||||
params.parsers.micromark.tokens;
|
||||
const micromarkTokens = params.parsers.micromark.tokens;
|
||||
|
||||
// Process Markdown images
|
||||
const images = filterByTypes(micromarkTokens, [ "image" ]);
|
||||
const images = filterByTypes(
|
||||
micromarkTokens,
|
||||
[ "image" ]
|
||||
);
|
||||
for (const image of images) {
|
||||
const labelTexts = filterByTypes(image.children, [ "labelText" ]);
|
||||
if (labelTexts.some((labelText) => labelText.text.length === 0)) {
|
||||
|
|
@ -40,7 +39,11 @@ module.exports = {
|
|||
}
|
||||
|
||||
// Process HTML images
|
||||
const htmlTexts = filterByTypes(micromarkTokens, [ "htmlText" ], true);
|
||||
const htmlTexts = filterByTypes(
|
||||
micromarkTokens,
|
||||
[ "htmlText" ],
|
||||
true
|
||||
);
|
||||
for (const htmlText of htmlTexts) {
|
||||
const { startColumn, startLine, text } = htmlText;
|
||||
const htmlTagInfo = getHtmlTagInfo(htmlText);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue