mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 22:40:13 +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/md054.js
17
lib/md054.js
|
|
@ -40,13 +40,11 @@ module.exports = {
|
|||
// Everything allowed, nothing to check
|
||||
return;
|
||||
}
|
||||
// eslint-disable-next-line jsdoc/valid-types
|
||||
/** @type import("../helpers/micromark.cjs").Token[] */
|
||||
const micromarkTokens =
|
||||
// @ts-ignore
|
||||
params.parsers.micromark.tokens;
|
||||
const { definitions } = referenceLinkImageData();
|
||||
const links = filterByTypes(micromarkTokens, [ "autolink", "image", "link" ]);
|
||||
const links = filterByTypes(
|
||||
params.parsers.micromark.tokens,
|
||||
[ "autolink", "image", "link" ]
|
||||
);
|
||||
for (const link of links) {
|
||||
let label = null;
|
||||
let destination = null;
|
||||
|
|
@ -89,7 +87,8 @@ module.exports = {
|
|||
}
|
||||
}
|
||||
if (isError) {
|
||||
let range = null;
|
||||
// eslint-disable-next-line no-undef-init
|
||||
let range = undefined;
|
||||
let fixInfo = null;
|
||||
if (startLine === endLine) {
|
||||
range = [ startColumn, endColumn - startColumn ];
|
||||
|
|
@ -119,8 +118,8 @@ module.exports = {
|
|||
onError,
|
||||
startLine,
|
||||
text.replace(nextLinesRe, ""),
|
||||
null,
|
||||
null,
|
||||
undefined,
|
||||
undefined,
|
||||
range,
|
||||
fixInfo
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue